enableDistributedParsing problem on sub items

Hi,



If a row has 6 or more dynamically retrieved kids, the first click on the + correctly retrieves the xml via dynamic request, but the retrieved data is not shown below the clicked row automatically. It expands instantly if clicked again though.



If a row has 5 or less, it correctly retrieves the data and expands the tree with only one click on the +.



if I disable enableDistributedParsing, then it shows all kids ok, but I would like to use that feature since it helps with the initial load. Why are my enableDistributedParsing settings not working on kid rows?



Here is my ini code:



mygrid = new dhtmlXGridObject(‘gridbox’);

mygrid.preventIECaching(true);

mygrid.selMultiRows = true;

mygrid.enableDistributedParsing(true,5,50);

mygrid.kidsXmlFile = ‘test_xml_child.php’;

mygrid.imgURL = ‘/lib/grid/dhtmlxGrid/codebase/imgs/’;

mygrid.setHeader(‘Account,Scheduled,Potential,% Probability,YTD,2006,2005,Sales Stage,Notes’);

mygrid.setInitWidths(‘300,75,75,75,75,75,75,75,200’)

mygrid.setColAlign(‘left,left,left,left,left,left,left,left,left’)

mygrid.setColTypes(‘tree,ro,edn,coro,ro,ro,ro,coro,txt’);

mygrid.setColSorting(‘str,int,int,int,int,int,int,int,na’)

mygrid.setColumnColor(‘white,white,white,white,white,white,white,white’);



mygrid.setOnRowDblClickedHandler(doOnRowDblClicked);

mygrid.init();

mygrid.loadXML(‘test_xml.php’);

mygrid.attachEvent(‘onOpenStart’,function(id){

mygrid.setSelectedRow(id);

return true;

});



test_xml result:

~200 rows that look like this:



<row id=’".$row[‘acct-no’]."’ child=‘1’ xmlkids=‘1’>

“.preg_replace(”/[^a-z0-9 .-]/i","",$row[‘acct-name’])."

“.$row[‘Sched’].”

“.$row[‘Poten’].”



“.$row[‘CurYTD’].”

“.$row[‘LstYTD’].”

“.$row[‘LstLstYTD’].”

“.rand(1,4).”

Notes







test_xml_child.xml result

~5-20 rows that look like this:



    <row id=’{$id}_".$row[‘issuemo’]."’ child=‘1’ xmlkids=‘1’ style=‘background-color: #F1FFD5’>

        “.$row[‘issuemo’].”

        “.$row[‘Sched’].”

        “.$row[‘Poten’].”

        “.$row[‘PProb’].”

        “.$row[‘CurYTD’].”

        “.$row[‘LstYTD’].”

        “.$row[‘LstLstYTD’].”

        

        

    

The problem is that enableDistributedParsing was purposed for plain grids and not works so well with treeGrids ( actually it can be updated to work correctly in simple cases, but in case of concurrency, when few rows can be expanded in same time it will fail for sure)

If necessary I can provide more stable variation of functionality ( please contact directly at support@dhtmlx.com ), but it will not be good in case of concurrency

Actually in your case you can still use distributed parsing for first level, but not use it for childs.

mygrid.attachEvent(“onXLE”,function(){
    mygrid.enableDistributedParsing(false);
});

This code will disable distributed parsing after first level of treeGrid loaded