R2 2018 Release is here – now with modern UI for chatbots and more! See what’s new!
Change Theme

SASS Themes

    LESS Themes

      SASS Theme Builder

      Create new or customize SASS themes
      Launch Theme Builder

      Custom command

      Description

      The demonstrated solution in this example shows how to implement a custom command column in the ASP.NET Core Grid by Telerik.

      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:

      columns.Command(command => command.Custom("ViewDetails").Click("showDetails"));
      The generated button will be decorated with a class which follows the convention "k-grid-[CommandName]" and the click handler receives the corresponding grid as an argument.

      In this demo we use a Kendo UI Window widget to display details about the chosen row in the ASP.NET Core grid.

      More about Telerik Grid for ASP.NET Core

      ASP.NET Core source

      Also available for:

      • custom_command.cshtml
      • Custom_CommandController.cs
      • EmployeeViewModel.cs

      Support & learning resources

      Grid for other technologies