【发布时间】: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