This example demonstrates Telerik RadGrid's view state optimization and performance mechanism.
Disabling RadGrid's view state by setting the EnableViewState property to false will save the most important
data to the page control state and will force a grid rebind on every postback.
This feature is available in ASP.NET 2.0 only:
for ASP.NET 1.x you will have to have RadGrid's view state enabled. To optimize the view state size there you can use
the DataSourcePersistenceMode property.
The DataSourcePersistenceMode property of GridTableView indicates where Telerik RadGrid will store its data and determines
how DataSource of the GridTableView will be persisted on postback. It has two settings:
- NoPersistence- DataSource (or generated html tables) data will not be stored in ViewState.
- ViewState - RadGrid stores data in the ViewState bag (this is the default value).
Note that some operations in Telerik RadGrid like data extraction through the ExtractValuesFromItem method, grouping,
hierarchical views expand/collapse, custom edit forms (WebUserControl and FormTemplate) or filtering
require that view state is enabled. Those features will not work if DataSourcePersistenceMode is set to NoPersistence or EnableViewState is set to false.
You can find more tips about how to speed up the grid performance in the Performance tips
and tricks chapter in the online documentation: Performance tips and tricks