Forum
19:50
15/02/2010
Hello all,
I am having a problem with an autoloading tree grid.
At present I have a structure that is only 2 levels deep.
1
a
b
c
2
a
When I click to expand a node, the grid seems to add another instance of the root node again as well as whichever sub node(s) should have been shown based on the the root node selected.
1
1
a
b
c
Here is a look at the XML before selecting the root node:
<?xml version="1.0" encoding="UTF-8"?>
<rows>
<page>1</page>
<total>1</total>
<records>1</records>
<row>
<cell>1112</cell>
<cell>Parent 1</cell>
<cell>0</cell>
<cell>NULL</cell>
<cell>false</cell>
<cell>false</cell>
</row>
</rows>
<?xml version="1.0" encoding="UTF-8"?>
<rows>
<page>1</page>
<total>1</total>
<records>1</records>
<row>
<cell>1112</cell>
<cell>Parent 1</cell>
<cell>0</cell>
<cell>NULL</cell>
<cell>false</cell>
<cell>false</cell>
</row>
<row>
<cell>5207</cell>
<cell>Child 1</cell>
<cell>1</cell>
<cell>1112</cell>
<cell>false</cell>
<cell>false</cell>
</row>
</rows>
Also, here is my config:
$(document).ready(function(){
$("#gReport").jqGrid({
treeGrid: true,
treeGridModel: 'adjacency',
ExpandColumn: 'company',
url: document.forms['frmReport'].elements['gaddr'].value,
datatype: 'xml',
mtype: 'GET',
colNames: ["ID", "Company"],
colModel: [
{name: 'id', index: 'id', width: 1, hidden: true, key: true},
{name: 'company', index: 'company', width: 40, hidden: false, sortable: true}
],
rowNum: -1,
width: 980,
height: 'auto',
pager: false,
caption: ''
}),
});
14:05
10/08/2009
You are right Matt, but the question was already answerd here.
Best regards
Oleg
Most Users Ever Online: 715
Currently Online:
47 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66