there seems to be a bug in your commands column and it's made worse when loading/saving grid layouts.
When i load a page with this grid column definition,
.Groupable() .Columns(columns => { columns.Command(cmd => cmd.Custom("Undelete") .Click("undelete")) .Width(60);
when you inspect the grid, the grid internally shows two classes for the command cell:
attributes: {class: 'k-command-cell k-command-cell'}
now, if i apply a grid layout, the problem gets worse. This sample code will cause the dom to end up with multiple k-command-cell classes on the grid's td element.
$("#UndeleteGrid").data("kendoGrid").setOptions($("#UndeleteGrid").data("kendoGrid").getOptions())
<td class="k-command-cell k-command-cell k-command-cell k-command-cell k-command-cell k-command-cell k-command-cell k-command-cell k-command-cell" role="gridcell"><a role="button" class="k-button k-grid-Undelete" href="#" title="Undelete"><span class="k-icon k-i-undo"></span></a></td>
Hello John,
Thank you for writing to us!
I saw what's the problem and I'll be glad to help you, if you can give me more information about what exactly you are trying to do, because these functions are not supposed to be used this way.
For more information about the persist state you can read more in the Description section of this demo:
https://demos.telerik.com/kendo-ui/grid/persist-state
These two functions ('setOptions' & 'getOptions') are used together to persist the state as it's shown in the linked demo.
If u just want to change an option in the Grid, you can use 'setOptions' without passing 'getOptions'.
Regards,
Yanislav
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.