Can someone please help me with this. I've asked a few times and I just can't believe I'm the only one who has encountered this. I have never created a form where the same fields I'm editing are the same fields I'm inserting. It appears the kendo grid uses the same template to display the edit and the insert fields. Example: I may way to insert a status but not be able to update it. Again, i never came across an application I have developed where the same fields are used for both an insert and an update..
I used a template but again it keeps firing the same template for the edit and update. Frustrating, please help.
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.CodeID);
columns.Bound(p => p.CodeDescription);
columns.Bound(p => p.Title);
columns.Bound(p => p.Status).Filterable(false);
columns.Command(command => command.Edit()).Width(200);
})
.ToolBar(toolBar => toolBar.Create().Text("Add New Code"))
.Sortable()
.Scrollable()
.Pageable()
.Filterable()
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
.Resizable(resize => resize.Columns(true))
.DataSource(dataSource => dataSource
.Ajax()
.Events(events => events.Error("error_handler"))
.ServerOperation(false)
.Model(model => model.Id(p => p.CodeID))
.Update(update => update.Action("Edit", "CodeManager", new { classifications = @ViewBag.SelectedCatgory }))
.Create(create => create.Action("Create", "CodeManager", new { classifications = @ViewBag.SelectedCatgory }))
)
.Editable(ed => ed.Mode(GridEditMode.PopUp).TemplateName("_CodeEditor"))
)
thanks
dennis
I used a template but again it keeps firing the same template for the edit and update. Frustrating, please help.
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.CodeID);
columns.Bound(p => p.CodeDescription);
columns.Bound(p => p.Title);
columns.Bound(p => p.Status).Filterable(false);
columns.Command(command => command.Edit()).Width(200);
})
.ToolBar(toolBar => toolBar.Create().Text("Add New Code"))
.Sortable()
.Scrollable()
.Pageable()
.Filterable()
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
.Resizable(resize => resize.Columns(true))
.DataSource(dataSource => dataSource
.Ajax()
.Events(events => events.Error("error_handler"))
.ServerOperation(false)
.Model(model => model.Id(p => p.CodeID))
.Update(update => update.Action("Edit", "CodeManager", new { classifications = @ViewBag.SelectedCatgory }))
.Create(create => create.Action("Create", "CodeManager", new { classifications = @ViewBag.SelectedCatgory }))
)
.Editable(ed => ed.Mode(GridEditMode.PopUp).TemplateName("_CodeEditor"))
)
thanks
dennis