Using this Grid with the Groups command button definition, I want to navigate to another MVC Action passing a CustomerId value as a parameter. I have an Event handler (with no JavaScript) but am not sure if this is the right approach. Should this be some type of HTML call? If JavaScript is the right way to do this then please supply some code.
This is for ASP.NET Core. Thanks in advance for your help, Joel.
@(Html.Kendo().Grid<
GsiPortal.Models.Customer
>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.Name);
columns.Bound(p => p.DisplayName).Title("Display Name");
columns.Bound(p => p.AddTimestamp).Format("{0:MM/dd/yyyy}");
columns.Command(command => command.Custom("Groups").Click("goGroups"));
columns.Command(command => command.Edit()).MinResizableWidth(75);
columns.Command(command => command.Destroy()).MinResizableWidth(75);
})
.Editable(editable => editable.Mode(GridEditMode.InLine)) //.TemplateName("CustomerEdit")) //Turn on the inline cell editing by setting
.Pageable()
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
.PersistSelection(true)
.Navigatable()
.Sortable()
.Scrollable()
.Filterable()
.HtmlAttributes(new { style = "height:550px;" })
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.ServerOperation(false)
.Events(events => events.Error("error_handler"))
.Model(model =>
{
model.Id(p => p.Id);
model.Field(p => p.Id).Editable(false);
model.Field(p => p.AddTimestamp).Editable(false);
})
.Read("IndexJson", "Customers")
.Update("Edit", "Customers")
.Create("CreateJson", "Customers")
.Destroy("DeleteJson", "Customers")
))