New to Telerik UI for ASP.NET MVC? Download free 30-day trial

Custom command

Loading Demo...
  • Edit in Theme Builder
  • custom_command.cshtml
  • Custom_CommandController.cs

Also available for:



The demonstrated solution in this example shows how to implement a custom command handling for records in the MVC Grid extension.

To do it you need to include a command column in the grid which will render a button in the column cells that triggers the command. Through the column definition you can specify the text for the button and wire its click event to a JavaScript function (Command -> Custom -> Click), which receives the corresponding grid data item as an argument. Then in this function definition you can handle the command.

In this demo we use Window widget instance to display details about the chosen row in the grid.

Support & Learning Resources