Hello!
I'm following these docs for inline gridview editing. My situation is a bit different than the doc samples. I've 3 grids on the page and working on adding an inline editing in one of them. Here's the code for that -
<form novalidate asp-controller="BusinessLines" asp-action="Update" method="post">
@(Html.Kendo().Grid<AJG.Cdi.Core.Models.BusinessLinesModel>()
.Name("grid2")
.Columns(columns =>
{
columns.Bound(b => b.CdPolicyLineTypeCode).Title("Line Type").Editable("false");
columns.Bound(b => b.EffectiveDate);
columns.Bound(b => b.ExpirationDate);
})
.ToolBar(toolBar =>
{
toolBar.Save();
})
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Pageable()
.Sortable()
.Scrollable()
.HtmlAttributes(new { style = "height:200px;" })
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Field(p => p.CdPolicyLineTypeCode).Editable(false);
})
.Update(update => update.Action("Update", "BusinessLines").Type(HttpVerbs.Post))
/*.PageSize(5)
.Read(read => read.Action("Get", "BusinessLines").Type(HttpVerbs.Get))*/
))
</form>
I want the above grid to hit BusinessLines\Update endpoint when pressed on "Save Changes", but it's going to the parent page's Action, which is Submissions\Edit. It's defeating the whole setup that I've put in-place.
If I do not refresh the page, it's throwing the errors listed in the 'error-1.png' attached file, while hitting 'Save Changes'
Also, please let me know - how can I get rid of time in the date field (ref: inline-editing-ui.png)?