I have a grid that only has a Delete button defined. The user can add a new record inline. How can I show the Save and Cancel buttons instead of the Delete button. They should not have an Edit button option.
Here is my code snippet:
@(
Html.Kendo().Grid<CommunityAssociationMasterModel>()
.Name("CommunityAssociationMasterList")
.Columns(columns =>
{
columns.Bound(p => p.DistrictCode).Title("District").Width(70);
columns.Bound(p => p.IndexNumber).Title("Index").Width(100);
columns.Bound(p => p.CreditName).Title("Credit");
columns.Command(command => { command.Destroy(); }).Width(210);
})
.ToolBar(toolbar => { toolbar.Create().Text("Add Credit Account"); toolbar.Excel(); })
.Sortable()
.Scrollable()
.Pageable()
.HtmlAttributes(new { style = "height:650px;" })
.Events(events => events.Change("onChange"))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Events(events => events.Error("error_handler"))
.ServerOperation(false)
.Model(model =>
{
model.Id(p => p.MasterCreditId);
model.Field(p => p.DistrictCode);
model.Field(p => p.IndexNumber);
model.Field(p => p.CreditName).DefaultValue("Community Assoc Credit").Editable(false);
})
.Read(read => read.Action("CommunityAssociation_Read", "CommunityAssociation"))
.Create(create => create.Action("CommunityAssociation_Create", "CommunityAssociation"))
.Destroy(read => read.Action("CommunityAssociation_Delete", "CommunityAssociation"))
)
I'm sure this is easy but I'm just not finding it.