This example shows how to use a custom column command in Telerik Grid for ASP.NET MVC. Custom commands can be configured to call action methods by making server side or ajax requests. In this particular example the custom command is requesting JSON from an action method and displays it using Telerik Window for ASP.NET MVC

To define a custom column command use the following code

View:
<%= Html.Telerik().Grid(Model)
        .Name("Grid")
        .Columns(columns => columns
            {
            columns.Command(commands => 
                // Define a custom command
                commands.Custom("viewDetails")// the constructor accepts the name of the custom command (used to differentiate between multiple custom commands)
                    // Set the text of the button
                    .Text("Customer Details")
                    // Specify which fields from the bound data item to include in the route (pass as action method arguments)
                    .DataRouteValues(route => route.Add(o => o.OrderID).RouteKey("orderID"))
                    // Make ajax requests
                    .Ajax(true)
                    // Which action method to call
                    .Action("ViewDetails", "Grid")    
                ));
            }
        )
%>
Controller:

public JsonResult ViewDetails(int orderID) // this argument comes from the data item (defined via DataRouteValues)
{
    // Get the order by the specified orderID
    var order = GetOrders()
                    .FirstOrDefault(o => o.OrderID == orderID);

    return Json(new { customer = order.Customer });
}