DHTMLXTreeGrid and forEachRow

Hello,

I use “forEachRow” to export the containt of my TreeGrid.
I would only export the containt of elements who are displayed.

All elements are good exported but the problem is that the children are at the end of my export.

Why children element are at the end into the function “forEachRow” ? Is it possible to have all element in the order of the tree ?

Are there another function to obtain flat export (csv for example) of TreeGrid ?

Thanks.

Hello,

try getAllSubItems() method:

var i,id,idsArray,list; list = mygrid.getAllSubItems(); idsArray = list.split(","); for(var i=0;i<idsArray.length;i++){ id = idsArray[i]; //your code here }

That works fine ! Thank a lot.