Create: Html.Kendo().Grid() .ToolBar(commands => commands.Create(Model.EnableCreate)) where EnableCreate is a bool. Next is Edit and Destroy: columns.Command(commands => { commands.Edit(item.EnableEdit); commands.Destroy(item.EnableDestroy); }) where item is the dataitem of the row and EnableEdit and EnableDestroy is bool properties.
Hi Mattias,
The visibility of the command buttons can be set conditionally based on a condition.
columns.Command(command =>
{
command.Edit().Visible("editVisible");
command.Destroy();
});
JavaScript:
function editVisible(dataItem) {
return dataItem.ID == 5;
}
There is an option to make columns conditionally editable as well. The functionality is explained in detail in the KB article below:
Regards,
Viktor Tachev
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/.