Hi,
Is it possible to load data from a xml file to a new column ?
Here is my issue :
I have a treegrid with 3 columns, when I expand a node, I would like to add a column and load the content of the new column with a xml file.
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setHeader("col1, col2, col3");
mygrid.attachEvent("onOpenEnd",addColumnAfterExpand);
mygrid.attachEvent("onOpenStart",hideColumnAfterExpand);
mygrid.loadXML("bdd/test.xml");
var newColId = 3;
function addColumnAfterExpand(id, state){
if (state == true){
if(mygrid.isColumnHidden(newColId))
mygrid.setColumnHidden(newColId,false);
else {
mygrid.insertColumn(newColId+1,"col4","ed",120,"na","left","top","","");
//here I would like to load the content for my new column
//from an xml File
}
}
mygrid.setSizes();
return true;
}
function hideColumnAfterExpand(id, state){
if (state == true){
mygrid.setColumnHidden(newColId,true);
}
mygrid.setSizes();
return true;
}
If someone has an idea ?
Thanks.