I have kendo mvc grid with inline edition. I want to edit my values in grid but when i click on combobox value and change it. It's not changing row value return old existing value
How can i solve this?
Here my grid and Templates
@(Html.Kendo().Grid<
MockUpForeNet.Controllers.CardDetailController.Limits
>()
.Name("limitgrid").AutoBind(true)
.DataSource(dataBinding => dataBinding.Ajax()
.Read("GridLimitBinding", "CardDetail",new { rule = rule }).Update("UpdateLimit", "Transaction")
.Model(keys =>
{
keys.Id(c => c.Id);
keys.Field(c => c.Id).Editable(false);
keys.Field("DurationType", typeof(string)).Editable(true);
keys.Field("DurationValue", typeof(string)).Editable(true);
keys.Field("ValueType", typeof(string)).Editable(true);
keys.Field("MaxValue", typeof(string)).Editable(true);
}).Batch(true).ServerOperation(false)
)
.Events(e => e.DataBound("hidecolumn1"))
.Editable(editing => editing.Mode(Kendo.Mvc.UI.GridEditMode.InCell))
.ToolBar(commands =>
{
commands.Create().Text(" ");
commands.Save().SaveText(" ").CancelText(" ");
})
.Columns(columns =>
{
columns.Bound(e => e.MaxValue).Width(200).Title("Limit").ClientTemplate("#= ValueType == 'Amount' ? Row(MaxValue) : RowLiters(MaxValue) #");
columns.Bound(e => e.ValueType).Width(200).Title("Type").EditorTemplateName("ValueType");
columns.Bound(e => e.DurationValue).Width(200).Title("Duration");
columns.Bound(e => e.DurationType).Width(200).Title("Duration Type").EditorTemplateName("DurationType");
columns.Bound(e => e.Id).Visible(false);
columns.Bound(e => e.Id).Width(80).ClientTemplate("<
img
src
=
'../../assets/images/icons/delete.svg'
id
=
'#=Id#'
/>").Filterable(false).IncludeInMenu(false).Title(" ");
})
//.Selectable()
.Sortable()
.Navigatable(configurator => configurator.Enabled(true))
///My editor templates
@(Html.Kendo().ComboBox()
.Name("cbvaltype")
.Items(i =>
{
i.Add().Text("Quantity").Value("Quantity");
i.Add().Text("Amount").Value("Amount");
})
)
@(Html.Kendo().ComboBox()
.Name("cmbdurationtype")
.Items(i =>
{
i.Add().Text("Hour").Value("Hour");
i.Add().Text("Day").Value("Day");
i.Add().Text("Week").Value("Week");
i.Add().Text("Month").Value("Month");
i.Add().Text("Year").Value("Year");
})
)