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

Thread is closed for posting
1 posts, 0 answers
  1. Telerik Admin
    Telerik Admin avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 22 Feb 2013 Link to this post

    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:
        <add key="BindGridInvisibleColumns" value="true"/>

    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.
Back to Top