What is the function that is called when a user scroll down a list and when there is more data, it automatically fetches from the database? In other words, what is the function that automatically triggers the fetchData with the startrow and row? I want to override it. thanks
There are several places you could override that behavior. One is dataSource.transformResponse(). What are you trying to do?
I notice that autofetchdata for a listgrid when attached to a datasource will cache data when between ranges. The problem with this now is that if I have 300 entries in the database, the initial load on the listgrid would be 75. When I scroll down further, it would cache the next 75. Now, I noticed that if I scroll back to the top, the listgrid needs to contact the server again. How would I make it so that the resultset will cache all that I load instead of a couple of pages at a time? Thanks.
I think you might have been inadvertently looking at the examples of a less capable framework
because what you describe is not what SmartClient does.
SmartClient’s default caching, handled by the ResultSet class, will retain all previously cached rows and will not re-fetch a previously loaded range of rows unless you explicitly tell it to. Try any online example, eg, the Showcase Application, to verify this.
The only way you could get the behavior described is if you explicitly set dsResponse.invalidateCache:true on every dsResponse.
zeert2002 think at this situation:
You have a table with 1 milion records…that means u gonna cache on your client computer 1 mil records if he wants to see the list from top to bottom. :))
For me that’s a horror scenario. :))