Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
375
Load on Demand
posted

I've been doing a little reading on load on demand.

I've got a grid that I wish to load on demand. This is a client server application, so I don't want to be getting thousands of rows from the server and throwing them to the client across the network.

I have a method for paging the data by using AfterRowRegionScroll and looking for a particular row in the VisibleRows collection. The problem is the scrollbar - obviously when first displayed the datasource has 250 rows in it, so it sizes the scroll bar accordingly, as more rows are added the scrollbar is resized, which obviously looks a bit ugly and could be ocnfusing to the user.

I read about setting the number of rows on the ultradatasource so that the scrollbar is sized correctly the first time - I did this with Rows.SetCount() - the problem here is that this creates rows in the datasource, which are then bound to the grid, so when I retrieve data instead of adding rows to the grid I'd need to keep track of how many were previously loaded, then amend each row in the datasource with my data. This is somewhat awkward.

Is there a better way to do this or should I switch to a different control that has proper support for this ?

Parents
  • 469350
    Verified Answer
    Offline posted

    What you would probably need to do here is change around your implementation so that it no longer uses the AfterRowRegionScroll event and instead uses the events of the UltraDataSource that request data. That's the intended way to use UltraDataSource on-demand.

     

Reply Children
No Data