Hello all
I am trying to add a custom Command button right next to my EDIT/DELETE buttons. So far I found a good sample such as:
http://demos.telerik.com/aspnet-mvc/razor/grid/customcolumncommand
but that does not put an image on the custom button and I dont need to execute an Action.
I actually need to call a Javascript funtion which will open a window and I also need to pass the ID of the row.
How do I achieve that?
ps: I also tried to use
columns.Command(commands =>
{
commands.Edit().ButtonType(buttonType);
commands.Delete().ButtonType(buttonType);
commands.Custom("viewDetails").Text("D");
}).Width(150).Title("Commands");
... .ClientEvents(events => events.OnCommand("Grid_onCommand"))
function Grid_onCommand(e) {
if (e.name == "viewDetails") {
alert("onCommand"); //alert is not showing
//I also need to retrieve the row ID to use here
}
}
Thank you
Max