I am using dynamic smart rendering with version 2.5. The issue is that I display 30 rows initially and
after that when I scroll a request is made to the server to get the new content. This is working fine but the issue is when i scroll down just once the dhtml makes more than one request…
example :- initial display is from 0 - 30 records.
then on scrolling past 30, the grid makes sever calls like 30 - 32 , 30 -33 , 30 - 34 and then again 30 -32…
Should it not make only one call 30 - 34, if i scroll again before this dataset being rendering then it can make a new call like 30 -40 depending on how much I have scrolled.
Can anyone tell me why it is making multiple server calls on just scrolling once.
If data request not finished yet, and you are continuing to scroll the grid - new request will be issued - which can lead to situation as you have described. ( if rows-30-32 is not loaded, the next request will ask for rows 30-34, but if the are already loaded only rows 32-34 will be requested )
thanks for the response …is there some way i can avoid this…the thing is that the query takes like 2- 3 seconds to execute on the server side…
Also i am just scrolling once and not with a pause so according to me the grid should ask for 30-34 directly and not 30-32 and then 30-34. Is there some way I can add a time delay of 1 seconds before the grid makes a call to the server on scrolling…i think that should work right?
Try to use enablePreRendering() method. This method allows to pre-render rows during scrolling, make scrolling more smooth, but with small drop in overall performance.
The reason I am trying to reduce 2 calls is to get a gain in performance if pre-rendering is more resource sensitive then it defeats my full purpose…anyway I appreciate your suggestion.
One workaround is that I have removed smart rendering and implemented pagination with 30 rows in each page, this helps a lot because in each call i will get 30 rows when the user clicks the page number at the bottom of the grid. Hence there will be no call like 30-32 and 30-34…
Do you guys think this is a better approach. But still the doubt remains that there should be some time delay which should be added in smart rendering mode when the user scrolls the page.
I have the same problem… requests continue to be generated when I keep the arrow-down pressed, thus overloading the server at a certain point.
I’m thinking of going towards your solution (custom pagination) but I wonder what is the purpose of SmartRendering when it actually doesn’t take into consideration server response time…