kendoGrid mvc3 c#弹出网格窗口可能吗?

时间:2014-04-22 07:24:20

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

我有一个带有弹出窗口的kendogrid视图,显示我的剑道的属性我希望以网格形式显示我的弹出窗口是否可以在可能弹出窗口中使用kendogrid ui?有我的剑道网格:

 @(Html.Kendo().Grid(Model)
    .Name("Grid")
    .HtmlAttributes(new { style = "width:900px;height:500px" })
    .Editable(editing =>
        {
            editing.Mode(GridEditMode.PopUp).TemplateName("PopupEditors/PopupRubriqueIntermediare")
            .Window(w => w.Title("NeoPaie :Selection Rubrique").Width(400).Height(300));
            editing.DisplayDeleteConfirmation("Êtes-vous sûr de vouloir supprimer cette Rubrique Intermediare ?");
        })

         .ToolBar(commands =>
    {
        commands.Create().Text("Ajouter").HtmlAttributes(new { style = "width:100px;float:right" });

    })

        .DataSource(dataSource => dataSource
            .Ajax()
            .Read("Read", "RubriqueIntermediare")
             .Create("Save", "RubriqueIntermediare")
            .Update("Save", "RubriqueIntermediare")
            .Destroy("Delete", "RubriqueIntermediare")
           .Model(model => model.Id(p=>p.Rubrique_IntermediaireId))
             .Events(e => e.RequestEnd("OnKendoGridSaveEnd").Error("OnKendoGridPopupListSaveError"))
            )
             .Columns(columns =>
    {
        columns.Bound(p => p.Rubrique_IntermediaireId).Groupable(false).Hidden();
        columns.ForeignKey(p => p.RubriqueId, ViewData["CodeRubrique"] as SelectList).Width(80).Title("Rubrique");
        columns.ForeignKey(p => p.RubriqueId, ViewData["LibelleRubrique"] as SelectList).Width(150).Title("Description");
        columns.Command(command => command.Destroy().Text(" ")).Width(80).Title("Supprimer").HtmlAttributes(new { style = "text-align:center" });


    })
 .Scrollable()
            .Selectable(selectable => selectable
                .Mode(GridSelectionMode.Single)
                .Type(GridSelectionType.Row))

    .Navigatable()
    .Sortable()
  )

也是我的弹出窗口:

@using System.Collections
@using Kendo.Mvc.UI;
@using NeoPaie.ViewModels;

@model  RubriqueIntermediareVM



<div class="popupError"></div>

@Html.HiddenFor(model => model.RubriqueId)

<div class="editor-label">Code</div>
<div class="editor-field">
    @Html.Kendo().ComboBoxFor(m => m.RubriqueId).BindTo(ViewData["CodeRubrique"] as SelectList).HtmlAttributes(new { style = "width:250px" })
</div>


<div class="editor-label">Libelle</div>
<div class="editor-field">
    @Html.Kendo().ComboBoxFor(m => m.RubriqueId).BindTo(ViewData["LibelleRubrique"] as SelectList).HtmlAttributes(new { style = "width:100px" })
</div>

0 个答案:

没有答案