2

I want to use the Treegrid which is from here: http://mvcjqgrid.skaele.it/Home/TreeGrid I am not able to find a working sample with the controller, model code needed to get it working. I have been using the normal grid version and like the grid otherwise. Please guide me if there is anybody has used the treegrid from MvcJQGrid successfully. I modified the view (the HTML helper ) as requested by the author but could not see the tree view. Works like normal grid.

@(Html.Grid("basic")
.AddColumn(new Column("Id")
.SetLabel("Id")
.SetKey(true)
.SetWidth(75))
.AddColumns(new Column[] { 

                new Column("GroupName").SetLabel("Group Name").SetWidth(200)
                .SetAlign(MvcJqGrid.Enums.Align.Center).SetAsExpandable(),
                new Column("PhaseName").SetLabel("Phase Name").SetWidth(200)
                .SetAlign(MvcJqGrid.Enums.Align.Center),
                new Column("IdPhase").SetLabel("Phase Id").SetWidth(200)
                .SetAlign(MvcJqGrid.Enums.Align.Center),
                new Column("IsActive").SetLabel("Active")
                .SetWidth(100).
                SetAlign(MvcJqGrid.Enums.Align.Center)
                .SetFormatter(MvcJqGrid.Enums.Formatters.Checkbox)
    })
.SetUrl("/Group/GetGroupsByPhase?id=" + ViewBag.DefaultPhaseId)
  .EnableTreeGrid()
.SetAutoWidth(false)
.SetHeight(300)
.SetRowNum(15)
.SetRowList(new int[] { 5, 10, 15, 20 })
.SetViewRecords(true)
.SetPager("pager")
.SetSearchToolbar(true)
.SetSearchOnEnter(false)

.OnDblClickRow("onDblClickRow(rowid,iRow,iCol,e)"))

Thanks in advance.

Arathy T N
  • 306
  • 3
  • 13

0 Answers0