JQGrid treegrid 樹形表格示例


html內容

 <table id="gridList"></table>

jqgrid需要特殊設置的部分

   ExpandColumn: 'FullName',
                treeGrid: true,
                treeGridModel: "adjacency",

后台返回數據需要添加以下字段的

        /// <summary>
        /// 層級
        /// </summary>
        public int level { get; set; }
        /// <summary>
        /// 上級
        /// </summary>
        public string parent { get; set; }
        public bool isLeaf { get; set; }
        public bool expanded { get; set; }
        public bool loaded { get; set; }

效果如下:

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM