今天 搞 这个tree弄了半天没出数据,后来又 深入研究了一下 官网给的php的例子,本来确实看不懂,

静下心来研究了一下,终于搞懂了

先看一下 成果:

JQgrid tree 终于有数据了,, 没数据的童鞋 来看吧

 

下面贴代码:

$("#treegrid").jqGrid({
               treeGrid: true,
               treeGridModel: 'adjacency',
               ExpandColumn: 'name',
               ExpandColClick: true,
               url: 'tree.json',
               datatype: 'json',
               colNames: ["管理选项"],
               colModel: [{
                   name: 'name',
                   index: 'name'

               }],
               pager: "false",
               height: 'auto',
               width: '210',
               viewrecords: true,
               //   caption: 'none',
               jsonReader: {
                   root: "rows",
                   total: "total",
                   repeatitems: true
               }

           });

 

<table >  这次才显示正常

 

),否则不起作用.我也不明白为啥.

 

上面的都是我 个人实践所得所想,哪里说得不对,希望高手指出….

相关文章:

  • 2021-10-01
  • 2022-01-23
  • 2021-09-16
  • 2022-12-23
  • 2021-06-12
  • 2021-07-06
猜你喜欢
  • 2021-08-15
  • 2021-06-15
  • 2021-05-30
  • 2021-12-06
  • 2021-06-30
  • 2021-06-14
相关资源
相似解决方案