Hello I am tryint to bind create action from Kendo Grid:
This is supposed to send Create action to my Admin controller (this works)
Now if I try to create ne record it will trigger my breakpoint in controller but the list (although it has Count=1 for one new record) has GlobalProperty object but with all values (Id,Name,Value) null.
My firebug shows that I have
models[0][id] 0
models[0][name] test
models[0][value] testssss
as a part of my parametres, how do I serialize that to my List?
Please help I was trying to find it but without success.
@(Html.Kendo().Grid(Model.GlobalProperties).Name("GlobalProperties") .Columns(columns => { columns.Bound(p => p.Id).Hidden(); columns.Bound(p => p.Name); columns.Bound(p => p.Value); }) .DataSource(dataSource => dataSource.Ajax().Batch(true) .Model(model => model.Id(p => p.Id)) .Create("GlobalProperty_Create", "Admin") .Update("GlobalProperty_Editing_Update", "Admin") .Destroy("GlobalProperty_Editing_Destroy", "Admin") ) .ToolBar(toolbar => { toolbar.Create(); toolbar.Save(); }) .Editable(editable => editable.Mode(GridEditMode.InCell)))This is supposed to send Create action to my Admin controller (this works)
public ActionResult GlobalProperty_Create(List<GlobalProperties> models) { using (var db = new CPSkla.Models.CPSklaEntitiesCalculation()) { foreach (GlobalProperties model in models) { db.GlobalProperties.Add(model); db.SaveChanges(); } } return View(GetViewResult()); }Now if I try to create ne record it will trigger my breakpoint in controller but the list (although it has Count=1 for one new record) has GlobalProperty object but with all values (Id,Name,Value) null.
My firebug shows that I have
models[0][id] 0
models[0][name] test
models[0][value] testssss
as a part of my parametres, how do I serialize that to my List?
Please help I was trying to find it but without success.