开发者

Gridview - Is it necessary to grab data from database every time a filter, sort, or paging event occurs?

开发者 https://www.devze.com 2022-12-30 09:09 出处:网络
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 Bind

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


You could use jquery ? :-)


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号