The object returned by grid.getOptions() includes the "attributes" object for columns, such as the following:
"attributes":{"style":"text-align: right;"}
However, it does not include the header attributes. If I apply saved grid state using grid.setOptions(), my header attributes defined via HeaderHtmlAttributes is removed. Is there a way to set the grid options while preserving the header attributes?
Here's the code I'm using to set the grid options:
"attributes":{"style":"text-align: right;"}
However, it does not include the header attributes. If I apply saved grid state using grid.setOptions(), my header attributes defined via HeaderHtmlAttributes is removed. Is there a way to set the grid options while preserving the header attributes?
Here's the code I'm using to set the grid options:
var grid = $("#CaseloadGrid").data("kendoGrid");var savedOptions = localStorage["caseload-grid-options"];if (savedOptions){ var state = JSON.parse(savedOptions); var options = grid.options; options.dataSource.pageSize = state.dataSource.pageSize; options.dataSource.sort = state.dataSource.sort; options.dataSource.page = state.dataSource.page; grid.setOptions(options);}