1

i have a kendogrid view with a popup window which display the attributes of my kendo i want to display my popup window in a grid form is that possible to use kendogrid ui also in may popup window or not?? there is my kendo grid:

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

ther is also my popup window:

@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>
ODE
  • 285
  • 5
  • 22
  • use custom command [link](http://demos.telerik.com/kendo-ui/web/grid/custom-command.html) – Sebastian Wąsik Apr 22 '14 at 07:31
  • But from my kendo grid when i add a new Rubrique the poup shows up and i validate the add from my poup window :in custom command i just have a poup window with information not with action which can be done is that right??@Sebastian Wąsik – ODE Apr 22 '14 at 07:48
  • create a form in a popup and use jquery ajax ([HttpPost]) – Sebastian Wąsik Apr 22 '14 at 09:07

0 Answers0