OnNeedDataSource with Paging and Sorting

2 posts, 0 answers
  1. bdk0172
    bdk0172 avatar
    50 posts
    Member since:
    Oct 2006

    Posted 03 May 2010 Link to this post

    We're using advanced data-binding with OnNeedDataSource.  When we retrieve new records to populate the grid, we do the following:
    grd.datasource = null;

    This fires the OnNeedDataSource event and returns a datatable.  What we've noticed is that if our initial retrieve takes 10 seconds to return the records and render the grid on the page, doing any paging or sorting will take the same amount of time when it also fires the OnNeedDataSource event.

    What can we do to make the paging and sorting quicker if we already have the data?
  2. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 03 May 2010 Link to this post

    You could cache the results or store it in the session, which will cut out the time used on retrieving the results.

    I hope that helps.
  3. DevCraft R3 2016 release webinar banner
Back to Top