I am using the Kendo UI Grid Edit and Delete commands in order to manage data.
The issue I am running into is that I have a custom style that needs to be applied to the delete button. I am able to add the classes on the DataBound event, however when the user attempts to edit the data, the styling goes away on the button and it returns to the default Kendo UI styling.
Jquery used to add style
function onRowBound(e) {
$(".k-grid-delete").removeClass("k-button k-button-icontext").addClass("btn btn-danger");
}
Kendo MVC Events
columns.Command(command => command.Edit()).Title("Edit");
columns.Command(command => command.Destroy()).Title("Remove")
.........
.Events(e =>
{
e.DataBound("onRowBound");
e.Cancel("onRowBound");
e.Edit("onRowBound");
}))
I have tried having the same method fire on the Cancel event, but the style still reverts to the default one. Is there any way to set the style, preferably without using the "ClientTemplate" functionality?