This is a migrated thread and some comments may be shown as answers.

OnNeedDataSource with Paging and Sorting

1 Answer 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
bdk0172
Top achievements
Rank 1
bdk0172 asked on 03 May 2010, 06:45 PM
We're using advanced data-binding with OnNeedDataSource.  When we retrieve new records to populate the grid, we do the following:
grd.datasource = null;
grd.rebind();

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?

1 Answer, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 03 May 2010, 07:35 PM
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.
Tags
Grid
Asked by
bdk0172
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
Share this question
or