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

ASP.NET Core Grid Custom Command

Loading Demo...
  • EXAMPLE
  • VIEW SOURCE
  • Edit in Telerik REPL
HtmlHelper
TagHelper
Files:
custom_command.cshtml
Custom_CommandController.cs
EmployeeViewModel.cs
Custom_Command_TagHelper.cshtml

Also available for:

CLIENT-SIDE API HTML HELPER API

Description

The Telerik UI for ASP.NET Core Data Grid provides configuration options for including a custom command column. As a result, the component will render a button in its column cells that will trigger the command.

Through the column definition of he Data Grid, you can specify the text for that button and wire its click event to a JavaScript function—columns.Command(command => command.Custom("ViewDetails").Click("showDetails"));. The generated button will be decorated with a class which follows the k-grid-[CommandName] convention and the click handler will receive the corresponding Grid as an argument.

This demo shows how to implement a custom command column in the Data Grid and use a Kendo UI for jQuery Window component to display details about the selected Grid row.

For more information, refer to the official Telerik UI for ASP.NET Core Data Grid product documentation on implementing custom command columns.

Additional Apps

This Grid example is part of unique collection of hundreds of ASP.NET Core demos, with which you can see all Telerik ASP.NET Core components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in Telerik REPL for ASP.NET Core or ThemeBuilder.

Support & Learning Resources

Additional Resources