Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Julien Pellet on Sep 08, 2008 01:54
open dhtmlx forum
dhtmlXgrid : Smart Rendering total_count parameter

I'm using smart rendering to present lots of data inserted in real time.
For this reason, i never know the total row count of presented datas (the could be 1000 row when user open the table and 5000 when he reaches the last page).
For this reasons, i can't use the solution displayed here : http://www.dhtmlx.com/docs/products/kb/index.shtml?cat=search&page=1&q=4844&ssr=yes&s=total_count
I may use it by searching searching the total count each X seconds, but my boss is not really ok with this.

I remember another solution, I have seen somewhere on you web: it's the way to present "1 to 10 rows on 100 known".
Can you please indicate me a solution for my problem or/and the link to the page i'm looking for?

Thanks,

Julien PELLET
Answer posted by Support on Sep 08, 2008 05:06
>>it's the way to present "1 to 10 rows on 100 known"
That was a "plain dyn. loading" mode, which not supported starting from dhtmlxgrid 1.6 

>>I may use it by searching searching the total count each X seconds
You can transfer such data as part of grid's XML instead
<rows ... >
   <userdata name="updated_count">5000</userdata>

grid.attachEvent("onXLE",function(){
   var count = grid.getUserData("","updated_count");
   // previously provided code for dataset update here
})


>>but my boss is not really ok with this
You need some kind of request to be sent to the server in any case. It may be part of common XML loading or separate request - but I don't see any way how client side code can know final count of rows without polling.