I want to use a treeGrid for eBay categories.
All categories started collapsed (pic: collapsed categories)
After klicking on Stamps the subcategories expands at the bottom of the table and not below Stamps (pic: expanded category Stamps)
My table definition:
$('#list').jqGrid({
cmTemplate:{sortable:false, autoResizable: true},
multiSort: false,
url:'/admin/ebay/kategorien/get_jqgrid',
datatype:'json',
mtype:'POST',
jsonReader:{ repeatitems: false },
colModel:[{name:'id',index:'id',width:1,hidden:true,key:true},
{name:'name', label:'Name', width:200},
{name:'site_id', label:'Site', width:60},
{name:'cat_id', label:'Kat.-ID', width:60},
{name:'leaf_category', label:'Erlaubt', width:60},
{name:'in_use', label:'Benutzen', width:64,
formatter:'checkbox', align:'center', stype:'select',
editoptions:{value:':Alle;-:-;+:+'}}],
pager:'#pager',
height:'auto',
autowidth:false,
shrinkToFit:false,
guiStyle: 'bootstrap',
viewrecords:true,
gridview:true,
loadComplete: function () {
$(this).triggerHandler('resize.jqGrid');
},
editurl:'/admin/ebay/kategorien/edit',
iconSet:'fontAwesome',
treeGrid:true,
treeGridModel:'adjacency',
ExpandColumn:'name',
ExpandColClick:'true',
caption:'eBay-Kategorien'
});
Data example:
{
"site_id":"0",
"cat_version":"114",
"cat_id":"20081",
"cat_level":"1",
"name":"Antiques",
"parent_id":"20081",
"leaf_category":"0",
"in_use":"0",
"id":"20081",
"level":0,
"parent":"null",
"isLeaf":"false",
"expanded":"false"
},
{
"site_id":"0",
"cat_version":"114",
"cat_id":"260",
"cat_level":"1",
"name":"Stamps",
"parent_id":"260",
"leaf_category":"0",
"in_use":"0",
"id":"260",
"level":0,
"parent":"null",
"isLeaf":"false",
"expanded":"false"
},
{
"site_id":"0",
"cat_version":"114",
"cat_id":"181423",
"cat_level":"2",
"name":"Africa",
"parent_id":"260",
"leaf_category":"0",
"in_use":"0",
"id":"181423",
"level":1,
"parent":"260",
"isLeaf":"false",
"expanded":"false"
},
I tested and searched much but i can't find a solution... What i doing wrong and how can i solve this?