Your datagrid length is nothing but the length of your dataprovider.
Say if your dataprovider is _dataprovider (which is a ArrayCollection) then you can get your datagrid rows length as _dataprovider .length
If this post answers your question or helps, please kindly mark it as such.
Are you using ArrayCollection? If yes, then you can loop through the ArrayCollection itself.
If you just wanted to know the number of rows in datagrid. There are 2 ways.
1. Can get the count from the dataprovider
2. can get the rowCount value of datagrid
If this doesnt solve ur requirement pls explain me what u exaclty want to do i will try my level best tu help u. .
Please mark if it answers\helps its the notification for me..
rowCount property does not return the number of rows. It returns the number of rows to be shown.
U can know the rows of data grid by using
dg.rowCount property of the data grid
The length of ur data provider is the length of ur row count
hopefully this will work?
1 person found this helpful
Hi Sam Jayanand,
Mind you we cannot get the no of rows in the DataGrid using the rowcount prtoperty of the DataGrid.
rowCount property indicates how many "number of rows to be displayed" but not the total count.
We can get the total no of rows using the dataprovider length.
Thanks bhaskarchari. it solves my problem... rowCount only returns the no of rows displayed that i was doing. so dp.length is the right solution.