【问题标题】:kendo grid view exception "You must use Incell edit mode for batche updates exception"kendo 网格视图异常“您必须使用 Incell 编辑模式进行批量更新异常”
【发布时间】:2014-04-14 16:24:05
【问题描述】:

当我想让我的视图出现异常时,我有一个带有弹出界面的剑道网格视图:“您必须使用 Incell 编辑模式进行批量更新”出现 剑道网格:`

@(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>


`

【问题讨论】:

    标签: c# html asp.net-mvc-3 kendo-grid


    【解决方案1】:

    我想我有一个答案。不是它会为你工作,但试试吧。 通常你有一个文件夹名称 Shared 和 Editor Templates。如果编辑器模板不存在,请创建它,然后将您的弹出界面放入。

    当你调用弹出窗口时,在你的代码中试试这个:

    .Editable(e => e.Mode(GridEditMode.PopUp).TemplateName("HelpEdit").Window(w => w.Title("Text").Width(970)))
    

    对我来说很好用

    希望能帮到你

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-10-06
      • 2013-08-25
      • 2014-05-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多