I have a kendo grid which uses server binding. I need to implement batch update in the same. How can i proceed for this.
Below is the example of grid I am using.
@(Html.Kendo().Grid(Model) // Bind the grid to the Model property of the view
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p=> p.addressId).Hidden(true);
columns.Bound(p=> p.Name).Title("Name");
columns.Bound(p=> p.Phone);
)
.Pageable() //Enable paging
.ToolBar(commands => commands.Create())
//Editable(editable => editable.Mode(GridEditMode.Inline))
.DataSource(dataSource => dataSource
.Server()
//.Batch(true)
// Configure CRUD -->
.Model(model => model.Id(p => p.ContactId))
.Create(create => create.Action("Create", "Home"))
.Read(read => read.Action("Index", "Home"))
.Update(update => update.Action("Update", "Home"))
.Destroy(destroy => destroy.Action("Destroy", "Home"))
// <-- Configure CRUD
)
.DetailTemplate(...)
)
Now i want to have a button, on click of which the data in the grid could be updated. What is the best way to proceed with this.
Batch(true) is not working with Server()?
Below is the example of grid I am using.
@(Html.Kendo().Grid(Model) // Bind the grid to the Model property of the view
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p=> p.addressId).Hidden(true);
columns.Bound(p=> p.Name).Title("Name");
columns.Bound(p=> p.Phone);
)
.Pageable() //Enable paging
.ToolBar(commands => commands.Create())
//Editable(editable => editable.Mode(GridEditMode.Inline))
.DataSource(dataSource => dataSource
.Server()
//.Batch(true)
// Configure CRUD -->
.Model(model => model.Id(p => p.ContactId))
.Create(create => create.Action("Create", "Home"))
.Read(read => read.Action("Index", "Home"))
.Update(update => update.Action("Update", "Home"))
.Destroy(destroy => destroy.Action("Destroy", "Home"))
// <-- Configure CRUD
)
.DetailTemplate(...)
)
Now i want to have a button, on click of which the data in the grid could be updated. What is the best way to proceed with this.
Batch(true) is not working with Server()?