I am using Kendo UI grid with GridEditMode.InCell
and I need to add a hyperlink for delete/destroy command in the grid column instead of the default "Delete" button.
My current code looks like:
c.Command(command => command.Destroy()).Width(90);
I am using Kendo UI grid with GridEditMode.InCell
and I need to add a hyperlink for delete/destroy command in the grid column instead of the default "Delete" button.
My current code looks like:
c.Command(command => command.Destroy()).Width(90);
Here is what I end up doing
c.Template(@<text></text>)
.Width(50)
.ClientTemplate(@"<a class=""k-button-icontext k-grid-delete"" href=""\#"">Delete</a>");
@(Html.Kendo().Grid<Your.Type>() ... .Editable(editable => editable.Mode(GridEditMode.InCell))
There are 2 types of GridEditModes. My link includes a span for the icon: <a class=""k-button k-button-icontext k-grid-delete"" href=""\#""><span class=""k-icon k-i-delete""></span>Delete</a>
–
Jornada All you need to do is to add an element which has the k-grid-delete
class.
For example you can add the following anchor element into a template column and it will start working as a delete button.
<a class="k-button k-button-icontext k-grid-delete" href="#">My delete !</a>
© 2022 - 2024 — McMap. All rights reserved.