I am working on ASP.NET MVC4 application with Kendo UI Grid.
And i want to show custom confirmation message for 'Destroy' command.And for that i am using custom command.
Below is the piece of the code for that :-
<%:Html.Kendo().Grid<Kendo.Mvc.Examples.Models.EmployeeViewModel>()
.Name("Grid")
.Columns(columns =>
{
columns.Bound(e => e.FirstName);
columns.Bound(e => e.LastName);
columns.Bound(e => e.Title);
columns.Command(command => command.Custom("ViewDetails").Click("showDetails"));
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("CustomCommand_Read", "Grid"))
)
%>
Now,i want to add one method in DataSource before call my "ShowDetails" javascript function(custom command onclick function).
So how can i add my action in DataSource section like - Read,Create,Destory ?