Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by oVox on Dec 12, 2007 05:50
open dhtmlx forum
Renedered Rows

HI!, I need to know the rendered rows count, something like mygrid.getRowsNum() but that returns only rendered ones (im using SRND of course)
Regards,
Answer posted by Support on Dec 12, 2007 06:09
There is next method
    var stats=grid.getStateOfView();

stats[0] - start index of view
stats[1] - size of view area
stats[2] - total count of rows in grid
Answer posted by oVox on Dec 12, 2007 07:26

This doesn't work the way i need, stats[2] returns all the rows, is just like getRowsNum().

I need to count only the ones that are already rendered on the client using SRND, for example:

My Dynamic Load XML brings me back 300 rows. On the client side, the first time i load the page, i see only rendered 30 ROWS, if i scroll down i see the next SRND load...i then when i need to know, how many are already rendered now, not the total XML (300 rows)

 

Regards, oVox.

 

Answer posted by Support on Dec 12, 2007 10:06
There is no easy way to calculate such data, next probably will work

var total=0;
mygrid.forEachRow(function(id){
    total++;
});

as result "total" will contain count of rows which was parsed from XML till current moment