C# 剑道格网视图异常“;对于批处理更新异常,您必须使用Incell编辑模式;
我有一个剑道网格视图,当我想获得我的视图时,会出现一个异常:“你必须使用Incell编辑模式进行批更新”出现 剑道格网:`C# 剑道格网视图异常“;对于批处理更新异常,您必须使用Incell编辑模式;,c#,html,asp.net-mvc-3,kendo-grid,C#,Html,Asp.net Mvc 3,Kendo Grid,我有一个剑道网格视图,当我想获得我的视图时,会出现一个异常:“你必须使用Incell编辑模式进行批更新”出现 剑道格网:` @(Html.Kendo().Grid(Model) .Name("Grid") .HtmlAttributes(new { style = "width:400px;height:800px; margin-left:auto;margin-right: auto;"}) .Editable(editing => {
@(Html.Kendo().Grid(Model)
.Name("Grid")
.HtmlAttributes(new { style = "width:400px;height:800px; margin-left:auto;margin-right: auto;"})
.Editable(editing =>
{
editing.Mode(GridEditMode.PopUp).TemplateName("PopupEditors/PopupBareme")
.Window(w => w.Title("NeoPaie : Ajouter/Modifier une Bareme").Width(400).Height(250));
})
.DataSource(dataSource => dataSource
.Ajax()
.Read("Liste", "Bareme")
.Update("Save", "Bareme")
.Model(model => model.Id(p => p.BaremeId))
.Events(e => e.RequestEnd("OnKendoGridAdministrationSaveEnd").Error("OnKendoGridPopupListSaveError"))
)
.Columns(columns =>
{
columns.Bound(p => p.BaremeId).Groupable(false).Hidden();
columns.Bound(p => p.NOTE).Width(80).Title("Note").Format("{0:n0}").HtmlAttributes(new { style = "text-align : left;" });
columns.Bound(p => p.JOURS).Width(100).Title("Nb.Jours").Format("{0:N2}").HtmlAttributes(new { style = "text-align :right ;" });
columns.Command(command => command.Edit().Text(" ")).Width(60).Title("Modifier");
})
.Scrollable()
.Selectable(selectable => selectable
.Mode(GridSelectionMode.Single)
.Type(GridSelectionType.Row))
.Navigatable()
.Sortable()
)
当我想修改列值时,应该显示我的弹出界面
@using System.Collections
@using Kendo.Mvc.UI;
@using NeoPaie.ViewModels;
@model BaremeVM
<div class="popupError"></div>
@Html.HiddenFor(model => model.BaremeId)
<div class="editor-label">NOTE</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.NOTE, new { @class = "k-textbox" , @style = "width:140px" })
</div>
<div class="editor-label">JOURS</div>
<div class="editor-field">
@Html.Kendo().NumericTextBoxFor(model => model.JOURS).Step(0.1).Decimals(2).HtmlAttributes(new { style = "width:100px" })
</div>
`
@使用System.Collections
@使用Kendo.Mvc.UI;
@使用NeoPaie.ViewModels;
@BaremeVM模型
@Html.HiddenFor(model=>model.BaremeId)
注
@Html.TextBoxFor(model=>model.NOTE,新的{@class=“k-textbox”,@style=“width:140px”})
焦耳
@Html.Kendo().NumericTextBoxFor(model=>model.JOURS).Step(0.1).Decimals(2).HtmlAttributes(新的{style=“width:100px”})
`
我想我有答案了。不是说它对你有用,而是试试看。
通常,您有一个共享的文件夹名,可能还有编辑器模板。如果编辑器模板不存在,创建它,然后将弹出界面放入
在调用弹出窗口时,请在代码中尝试以下操作:
.Editable(e => e.Mode(GridEditMode.PopUp).TemplateName("HelpEdit").Window(w => w.Title("Text").Width(970)))
这对我来说很好
希望我能帮忙