Won't Fix
Last Updated: 12 Feb 2016 11:05 by ADMIN
ADMIN
Kostadin
Created on: 12 Feb 2016 09:06
Category: Grid
Type: Bug Report
0
An error is thrown when changing the grid structure programratically and hide columns on the client.
The issue will not be fixed since there is a big chance to introduce a breaking change. Nevertheless, there is a simple solution that could be use. The solution is to manually remove the hidden column from the ClientState on the client.

    <script type="text/javascript">
        function test() {
            var gridID = $telerik.$(".RadGrid")[0].id;
            var clientState = document.getElementById(gridID + "_ClientState");
            var value = clientState.value;
            if (value) {
                var parsedValue = JSON.parse(value);
                parsedValue.hidedColumns = [];
                clientState.value = JSON.stringify(parsedValue);
            }
        }
    </script> 
0 comments