This is a migrated thread and some comments may be shown as answers.

Breaking change: Hidden column cell text is not persisted in ViewState

0 Answers 1771 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Telerik Admin
Top achievements
Rank 1
Iron
Telerik Admin asked on 22 Feb 2013, 03:24 PM

Q1 2013 (released Feb 20, 2013) brings a significant performance improvement to Telerik’s Grid for ASP.NET AJAX . Till Q1 2013, every hidden column (Visible=”false”) from the control used to store its cell data into the ViewState of the grid. However, in scenarios with many hidden columns or one hidden column bound to a large database this might have negatively impacted the performance of RadGrid.

We improved this behavior, so that the ViewState of RadGrid holds only the visible column data. However, if somewhere into the code you depend on the hidden column’s cell text which now will be empty (set to “ ”), this performance improvement will introduce a breaking change for you.

To resolve the issue for individual columns, you can replace the Visible property of the column with Display in order to get the corresponding value of the hidden column’s cell.

However, if the project is significantly large with many hidden columns or you want all of your invisible columns to hold their data, you can revert to the old behavior by setting the following property in the web.config file of the application:
<appSettings>
    <add key="BindGridInvisibleColumns" value="true"/>
</appSettings>

When the grid detects this setting, it will bind all invisible columns and put their values into the ViewState.

Please note that the BindGridInvisibleColumns property was introduced in 2014 Q2 SP1 (version 2014.2 724). With any previous versions, setting that property will not have any effect and you will still receive the previous behavior.
Tags
Grid
Asked by
Telerik Admin
Top achievements
Rank 1
Iron
Share this question
or