views:

85

answers:

3

Regarding gridviews that are not bound to a Data Source Control:

In most GridView tutorials that I have seen, when just about any GridView event occurs, the end of the event handler will include BindDataGrid().

In some form, these BindDataGrid() functions 1) Grab data from the database 2) Assign any Filter or Sort expressions to the data, and 3) Bind the gridview to that data source (usually a DataView or DataTable.

Is there a better way to provide filterable & sortable data to a GridView without having to hit the database so often?

Thanks

+1  A: 

You could use jquery ? :-)

JonH
Where is the data being stored between postbacks?
hamlin11
+1  A: 

hi

check this article which help you to achieve function you want : http://www.codeproject.com/KB/custom-controls/EnhanceGrid.aspx

Pranay Rana
I think this is a great way to only bring down the necessary data. In this case it is OK to hit the database several times because only 1 page of data is ever being drawn from the database. I'm just curious if there may be a method to not have to hit the database for those cases where all pages are brought down initially
hamlin11
thanks for reading my article
Pranay Rana
A: 

Use either Database Caching or Output Caching, otherwise you will have to pull from the database often.

hamlin11