json データを treegid で表示する例
json データを treegid で表示する例を以下に置いた。
https://gist.github.com/1856467
web 上にも json データを treegid で表示するサンプルはいくつかある。
- http://www.trirand.com/blog/?page_id=393/treegrid/json-and-xml-treegrid-complete-sample-solved/
> jQuery Grid PluginJSON and XML Treegrid complete sample (SOLVED) | TreeGrid | » Forum
- http://stackoverflow.com/questions/6788727/jqgrid-tree-grid-with-local-data
> javascript - jqGrid tree grid with local data - Stack Overflow
treegrid 表示のポイント:
grid には 次の設定をする。
treeGrid: true,
treeGridModel: 'adjacency'
ExpandColumn: '...'
json データの cell データの末尾に次の項目を追加する。
level 階層 (0,1, ...)
parent 親の Cell の id
isLeaf bool 値
expanded bool 値
loaded bool 値
最近のコメント