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.
Typically RadGrid stores in ViewState only items/controls collection, not data source
data. Sometimes though the page viewstate can grow too big and might significantly
increase the page download time. You can control this behavior by setting the EnableViewState
property to false if you do not wish the data
for the controls in the grid to to
be persisted in the view state. This means that the control will need to be rebound
on every request: either by firing the NeedDataSource event or by going through
an ASP.NET 2.x/3.x data source control. When having EnableViewState set to false,
RadGrid will use
the page control state to store only the absolutely necessary bits
of data that preserve the current paging, sorting or selected state.
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 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: Controls - RadGrid - "Performance tips and tricks"