I am currently investigating the Kendo UI.
Is it really true that you cannot edit a grid without a trip to the server for each add/update/delete with a popup editor? I would like the grid to be part of a larger object and nothing gets saved until the entire object gets saved. This seems like a very common scenario to me! Am I missing something?
If I don't supply a Create action, I get a compile error. If I set batch mode to true, and I leave off the Save command in the grid, it calls the create command when I add a row through a popup editor (and it calls the batch version of create passing multiple objects which is strange since the save should be deferred). If I set batch mode to true and include the Save command, I get a runtime error:
"You must use InCell edit mode for batch updates"
How can I use a popup editor for the grid and post the entire form to save my changes at a later date while avoiding constant trips to the server?
Leslie
@(Html.Kendo().Grid(Model.item.vendoritems)
.Name("grdVendorItems")
.Columns(columns =>
{
columns.Bound(c => c.vendorid);
columns.Bound(c => c.vendoritemcode);
columns.Bound(c => c.name);
columns.Bound(c => c.description);
columns.Bound(c => c.uomclassid);
columns.ForeignKey(c => c.vendorid, Model.vendorList, "Value", "Text");
columns.Command(command => { command.Edit(); });
}
)
.ToolBar(toolbar => { toolbar.Create(); toolbar.Save(); })
.Editable(editable =>
{
editable.Mode(GridEditMode.PopUp);
editable.TemplateName("vendoritemEditor");
editable.AdditionalViewData(new { VendorList = Model.vendorList, UOMClassList = Model.uomClassList });
}
)
.Sortable()
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
.Batch(true)
.Model(model =>
{
model.Id(i => i.id);
model.Field(i => i.id).Editable(false);
})
.Events(events => events.Error("error_handler"))
.Create(update => update.Action("EditingPopup_Create", "VendorItems"))
.Update(update => update.Action("EditKendo", "VendorItems"))
)
)
Is it really true that you cannot edit a grid without a trip to the server for each add/update/delete with a popup editor? I would like the grid to be part of a larger object and nothing gets saved until the entire object gets saved. This seems like a very common scenario to me! Am I missing something?
If I don't supply a Create action, I get a compile error. If I set batch mode to true, and I leave off the Save command in the grid, it calls the create command when I add a row through a popup editor (and it calls the batch version of create passing multiple objects which is strange since the save should be deferred). If I set batch mode to true and include the Save command, I get a runtime error:
"You must use InCell edit mode for batch updates"
How can I use a popup editor for the grid and post the entire form to save my changes at a later date while avoiding constant trips to the server?
Leslie
@(Html.Kendo().Grid(Model.item.vendoritems)
.Name("grdVendorItems")
.Columns(columns =>
{
columns.Bound(c => c.vendorid);
columns.Bound(c => c.vendoritemcode);
columns.Bound(c => c.name);
columns.Bound(c => c.description);
columns.Bound(c => c.uomclassid);
columns.ForeignKey(c => c.vendorid, Model.vendorList, "Value", "Text");
columns.Command(command => { command.Edit(); });
}
)
.ToolBar(toolbar => { toolbar.Create(); toolbar.Save(); })
.Editable(editable =>
{
editable.Mode(GridEditMode.PopUp);
editable.TemplateName("vendoritemEditor");
editable.AdditionalViewData(new { VendorList = Model.vendorList, UOMClassList = Model.uomClassList });
}
)
.Sortable()
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
.Batch(true)
.Model(model =>
{
model.Id(i => i.id);
model.Field(i => i.id).Editable(false);
})
.Events(events => events.Error("error_handler"))
.Create(update => update.Action("EditingPopup_Create", "VendorItems"))
.Update(update => update.Action("EditKendo", "VendorItems"))
)
)