2

我想使用来自这里的 Treegrid:http://mvcjqgrid.skaele.it/Home/TreeGrid 无法使用控制器找到工作示例,需要模型代码才能使其工作。我一直在使用普通网格版本,否则喜欢网格。如果有人成功使用了 MvcJQGrid 中的 treegrid,请指导我。我按照作者的要求修改了视图(HTML 助手),但看不到树视图。像普通网格一样工作。

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

提前致谢。

4

0 回答 0