Last post Mar 22, 2011 11:10 AM by sirdneo
Mar 21, 2011 10:49 PM|dieseldave|LINK
I have a datagrid that gets bound to a datatable. The first load, the request creates the datatable and binds it to the grid view. The data involved iuincludes all the age and gender classes of a race and is dumped unfiltered to the grid. Nowe the user
can filter the data by pressing on one of the page menu items which passes the window back to with the filter parms. I also assign the DATATABLE to a Session object.
I get the filter from the request string. Then I use it to filter the dataset that is stored in the Session and apply that to the gridview.
The question is - is this a good way to persist the datatable? I create a dataview using the filters and the Session datatable. Should I be using viewstate or an XML table? Any experience with this?
Mar 21, 2011 11:46 PM|Binary_Fiddle|LINK
Well it all boils downs to your application requirements however this is the rule that we follow
Object Scope Max. Data Size
ViewState Page Small (because it becomes part of all the paost back in he hidden field)
Session User Any
Cache All Users Any
Check out these
recommendations from Microsoft. You will find information on both client-side and server-side options.
Mar 22, 2011 11:10 AM|sirdneo|LINK
If information is same for all the users then you can store your primary datatable in Cache and when user applies filder load datatable from cache and apply filter on that datatable.