Keep gridview data source in post-back

0

I have a gridview that is populated by a web-service with data coming from SAP. It can return up to 2000 row with 30 columns. This content is always the same, so when running the web service 10 times will always return the same content. This grid is displayed to the user where filters and sorting can be applied through the column headers. Can I save the DataTable (or list) of the grid data source in the viewstate and do the filters and sorting. Except that the viewstate ends up bursting. Would you like to keep / save this content in the post-back so you can filter and sort? Because it does not make sense to run the webservice again, it takes time and it's always the same return.

    
asked by anonymous 21.11.2014 / 02:24

1 answer

1

ViewState would really be the first option to try, the second would be to try to work with Session .

Another recommended option would be to Cache of this query and then use it whenever necessary.

    
21.11.2014 / 11:19