@(Html.EJ().Grid<CodeLibelle>("gridmodifpresencepraticien_listeEtab" + Model.identifiantFicheCourante) .Datasource(ds => ds.Json((IEnumerable<CodeLibelle>)Model.ListeEtablissementDisponible).Adaptor(AdaptorType.RemoteSaveAdaptor)) .AllowScrolling(true) .AllowResizeToFit(true) .AllowRowDragAndDrop(true) .RowDropSettings(d => d.DropTargetID("#gridmodifpresencepraticien" + Model.identifiantFicheCourante)) .IsResponsive(true) .EnableResponsiveRow(true) .Locale("fr-FR") .Columns(col => { col.Field("libelle").HeaderText("Etablissements disponibles").TextAlign(TextAlign.Left).Width("160").AllowEditing(false).Add(); }))
@(Html.EJ().Grid<PresencePraticien>("gridmodifpresencepraticien" + Model.identifiantFicheCourante) .Datasource(ds => ds.Json((IEnumerable<PresencePraticien>)Model.monPraticien.PRESENCES).Adaptor(AdaptorType.RemoteSaveAdaptor)) .AllowScrolling(true) .AllowResizeToFit(true) .AllowResizing(true) .AllowRowDragAndDrop(true) .FilterSettings(fs => fs.FilterType(FilterType.Menu)) .IsResponsive(true) .EnableResponsiveRow(true) .Locale("fr-FR") .RowDropSettings(d => d.RowDropMapper(Url.Action("EtablissementDropHandler", new { controller = "FichePraticien", area = "Praticiens" }))) .EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.Batch); }) .Columns(col => { col.Field("ETABLISSEMENT.REF_ETABLISSEMENT").HeaderText("").Visible(true).Width("80").AllowEditing(false).Add(); col.Field("ETABLISSEMENT.NOM_COURT").HeaderText("Etablissement").TextAlign(TextAlign.Left).Width("160").AllowEditing(false).Add(); col.Field("STRUCTURES.LIBELLE").HeaderText("Structure").TextAlign(TextAlign.Left).Width("80").AllowEditing(true).Add(); col.Field("FSE").HeaderText("FSE").TextAlign(TextAlign.Left).Width("20").AllowEditing(true).Add(); col.Field("REMPLACANT.LIBELLE_PRATICIEN").HeaderText("Remplaçant").TextAlign(TextAlign.Left).Width("80").AllowEditing(true).Add(); col.Field("ACTE_DEFAUT.REF_ACTE").HeaderText("Acte").TextAlign(TextAlign.Left).Width("80").AllowEditing(true).Add(); }))
public ActionResult EtablissementDropHandler(List<CodeLibelle> added) { List<PresencePraticien> result = new List<PresencePraticien>(); foreach (CodeLibelle myEtab in added) { result.Add(new PresencePraticien(myEtab.code, myEtab.libelle, 0, "", "N", "", "", "")); } return Json(result, JsonRequestBehavior.AllowGet); }
@(Html.EJ().Grid<MVCSampleBrowser.Models.EditableOrder>("Grid1")
.Datasource(ds => ds.Json((IEnumerable<MVCSampleBrowser.Models.EditableOrder>)Model).Adaptor(AdaptorType.RemoteSaveAdaptor))
. . .
.Columns(col =>
{
col.Field("OrderID").IsPrimaryKey(true).HeaderText("Order ID").TextAlign(TextAlign.Left).Width("160").AllowEditing(false).Add();
}))
@(Html.EJ().Grid<object>("Grid2")
.Datasource(ds => ds.Json((IEnumerable<object>)ViewBag.data1).Adaptor(AdaptorType.RemoteSaveAdaptor))
. . . .
.AllowRowDragAndDrop(true)
.Columns(col =>
{
col.Field("OrderID").IsPrimaryKey(true).HeaderText("OrderID").Visible(true).Width("80").AllowEditing(false).Add();
. .
})
) |