I am using a grid to edit a table that is one column and that column is the primary ID. Therefore, I cannot edit the column. I want to allow adds and deletes (with checks in the background). There are two problems. I do not see the Add or Delete button in line. If I use the pop-up option, I can only add but the pop-up button states that I am editing, which would be confusing to the users. How do I get the grid to add and delete properly?
This is what I have:
This is what I have:
@(Html.Kendo().Grid<
NatureOfStudyViewModel
>()
.Name("NatureOfStudyGrid")
.Columns(columns =>
{
columns.Bound(item => item.NatureOfStudy);
})
.DataSource(ds => ds
.Ajax()
.Model(model =>
{
model.Id(m => m.NatureOfStudy);
})
.Read(read => read.Action("NatureOfStudyDataSource", "Lists"))
.Create(create => create.Action("NatureOfStudyCreate","Lists"))
.Destroy(destroy => destroy.Action("NatureOfStudyDelete","Lists"))
.Events(events => events.Error("listValueDataSource_error"))
)
.Pageable()
.ToolBar(commands => commands.Create())
.Editable(edit => edit.Mode(GridEditMode.PopUp))
)