我在两个nullable double values
中有一个网格,我想对其进行编辑。当我单击可编辑单元格并写入数字并不幸地传递了下一个单元格时,我之前编辑的单元格没有进行编辑
这是我的网格视图
@(Html.Kendo().Grid<Orpac.Controllers.SettingController.StationLocations>()
.Name("Coordinates").AutoBind(false)
.DataSource(dataBinding => dataBinding.Ajax()
.Read("GridStationLocationsBinding", "Setting").Update("UpdateStationLocationsBinding", "Setting")
.Model(keys =>
{
keys.Id(c => c.StationId);
keys.Field(c => c.StationCode).Editable(false);
keys.Field(c => c.StationName).Editable(false);
keys.Field("Lat", typeof(double?)).Editable(true);
keys.Field("Lon", typeof(double?)).Editable(true);
}).Batch(true).ServerOperation(false)
)
.Editable(editing => editing.Mode(Kendo.Mvc.UI.GridEditMode.InCell))
.ToolBar(commands =>
{
commands.Save();
commands.Excel().HtmlAttributes(new { @class = "btnexcel" }).Text(" ").IconClass("k-i-excel");
commands.Custom().Text(" ").HtmlAttributes(new { @class = "btnadd", id = "importcoordinates1", href = "#", tooltip = "Import Station Coordinates", onclick = "importcoordinateswin()" });
})
.Excel(excel => excel.FileName((string)ViewData["StationLocations"] + ".xlsx").AllPages(true).Filterable(true))
.Columns(columns =>
{
columns.Bound(e => e.StationId).Visible(false);
columns.Bound(e => e.StationCode).Width(100).Title((string)ViewData["Code"]);
columns.Bound(e => e.StationName).Width(200).Title((string)ViewData["Station"]);
columns.Bound(e => e.Lat).Width(100).Title((string)ViewData["Lat"]);
columns.Bound(e => e.Lon).Width(100).Title((string)ViewData["Lon"]);
})
.Sortable()
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str.Clear()
.StartsWith((string)ViewData["Startswith"])
.Contains((string)ViewData["Contains"])
))
)
.Scrollable(configurator => configurator.Height(500))
.Navigatable(configurator => configurator.Enabled(true))
)