subTree in treegrid cell

Hi,
I am using treegrid to display and configure details. I have 8 columns. In that i want display location, impact and criticality values. These columns are subTree columns. By clicking this it is populating respective tree and populating values. this is working fine. But the problem is if the ‘impact’ is already having value in database. It is not displaying in that grid. But if I click the blank cell impact column, it will display the impact tree. The problem is unable display already populated value if the coulmn type is stree. Please help me regarding this?

we can’t reconstruct the issue locally
if it still appears for you - please open ticket at support system and post some kind of sample or demo link, where it can be reconstructed.

Hi,

The actual problem is I unable link multiple trees in treegrid.
For example i want link a tree1 in coumn1 cells And link tree2 in Column2 and link tree3 in Column3 cells. Linking the tree in all column cells is working fine but cell is display anything(just blank). But the Loaded XML having values for all the cells. The cells in column2 and column3 does not display any default values at the time loading or after loading. Once I click the cell it is populating tree and selecting value. This is confusing user that what is the existing value and what he changed value?

I have found a example in ‘Grid linked to tree’ in dhtmlxSuite. But here you have used single tree to link to cell. I have modified that changed the column type to ‘stree,stree,stree .,…etc’ setSubtree for these columns. It is linking the trees but not displaying any values as default. Kindly help me to fix this. filename : pro_linked_tree.html and linked_grid.xml from dhtmlSuite

Any Ideas?

Hi ,

Linking tree with cell is not a problem. The linking is working fine.
For example The database have a country value ‘India’. It needs to display in a cell in country column. It should display ‘India’ at the time of loading grid. Now i want to change country, So i click the cell which holds value ‘india’ it is displaying location tree then i can change ‘Denmark’. The same like category tree, timezone tree. Here the problem is the cell is not displaying its value ‘india’ and it is just blank. The loaded xml having the value for the cell. The value for the cell ‘B-76’ which is the id for location tree. ex: Please help me

my code is below
locationTree=new dhtmlXTreeObject(“treeboxbox_locationTree”,“100%”,“100%”,0);
locationTree.setImagePath(“skins/basic/css/imgs/csh_winstyle/”);
var locationFile = ‘index.php?r=configuration/cIConfiguration/LocationTreeXML’;
locationTree.loadXML(locationFile);

        impactTree=new dhtmlXTreeObject("treeboxbox_impactTree","100%","100%",0);
		impactTree.setImagePath("skins/basic/css/imgs/csh_yellowbooks/");
		var impactFile = 'index.php?r=configuration/cIConfiguration/ImpactTreeXML';
		impactTree.loadXML(impactFile);
		
		cricticalityTree=new dhtmlXTreeObject("treeboxbox_cricticalityTree","100%","100%",0);
		cricticalityTree.setImagePath("skins/basic/css/imgs/csh_bluebooks/");
		var criticalityFile = 'index.php?r=configuration/cIConfiguration/CricticalityTreeXML';
		cricticalityTree.loadXML(criticalityFile);
		
		productTree=new dhtmlXTreeObject("treeboxbox_productTree","100%","100%",0);
		productTree.setImagePath("skins/basic/css/imgs/csh_bluebooks/");
		var productFile = 'index.php?r=configuration/cIConfiguration/ProductTreeXML';
		productTree.loadXML(productFile);
		
		timezoneTree=new dhtmlXTreeObject("treeboxbox_timezoneTree","100%","100%",0);
		timezoneTree.setImagePath("skins/basic/css/imgs/csh_bluebooks/");
		var timezoneFile = 'index.php?r=configuration/cIConfiguration/TimezoneTreeXML';
		timezoneTree.loadXML(timezoneFile);

timezoneTree=new dhtmlXTreeObject(“treeboxbox_timezoneTree”,“100%”,“100%”,0);
timezoneTree.setImagePath(“skins/basic/css/imgs/csh_bluebooks/”);
var timezoneFile = ‘index.php?r=configuration/cIConfiguration/TimezoneTreeXML’;
timezoneTree.loadXML(timezoneFile);

		categoryTree=new dhtmlXTreeObject("treeboxbox_categoryTree","100%","100%",0);
		categoryTree.setImagePath("skins/basic/css/imgs/csh_bluefolders/");
		var categoryFile = 'index.php?r=configuration/cIConfiguration/CategoryTreeXML';
		categoryTree.loadXML(categoryFile);
		
		categoryTree.loadXML(locationTree,function(){
       						
		mygrid1 = new dhtmlXGridObject('treeboxbox_deviceListTreeGrid');
        var title="CI Name ";
        var loctitle="Alias Name <font color='red'> *</font>";
        var ventitle="Category<font color='red'> *</font>";
        var iptitle="Location<font color='red'> *</font>";
        var imptitle="Impact<font color='red'> *</font>";
        var critititle="Criticality<font color='red'> *</font>";
        var producttitle="CI Product<font color='red'> *</font>";
        var timezonetitle="Time Zone<font color='red'> *</font>";
		mygrid1.selMultiRows = true;
		mygrid1.setImagePath("skins/basic/css/imgs/icons_greenfolders/");	
		mygrid1.setHeader(title + "," + loctitle + "," + ventitle + "," + iptitle + "," + imptitle + "," + critititle + "," + producttitle + ","+timezonetitle);
		mygrid1.setColumnIds("CI Name,Alias Name,Category,Location,Impact,Criticality,CI Product,Timezone");
		
		mygrid1.setInitWidthsP("18,18,10,9,9,9,9,18"); //width in percentage
		mygrid1.setColAlign("left,left,left,left,left,left,left,left");
		mygrid1.setColSorting("str,str,str,str,str,str,str,str"); 
		//attachment all trees with main grid
		mygrid1.setColTypes("tree,ed,stree,stree,stree,stree,stree,stree");
		 mygrid1.setSubTree(categoryTree,2,0); //category tree
	    mygrid1.setSubTree(locationTree,3,0); //location tree
	    mygrid1.setSubTree(impactTree,4,0); //impact tree
	    mygrid1.setSubTree(cricticalityTree,5,0); //criticality tree
	    mygrid1.setSubTree(productTree,6,0); //product tree
	    mygrid1.setSubTree(timezoneTree,7,0); //timezone tree
                mygrid1.init();
        
        dhtmlxEvent(mygrid1.entBox,"contextmenu",function(e)
         {
             (e||event).cancelBubble = true
              return false;
         });
        mygrid1.loadXML('index.php?r=configuration/cIConfiguration/GetUnManagedAssets&domainManagerId='+domainManagerId+'&CIID='+CIID);
     	 });

Still the problem is there.
Can you provide sample which has more than one subtree linked with a grid.?
The cell which link with subtree must have a default value. By clicking the default value, the stree will appear. Please provide sample.

Unfortunately your issue cannot be reconstructed locally.
Please, make sure that each tree’s data is loaded at the moment of the init of the grid, also make sure that you have added the correct tree’s id in grid’s xml.

If issue still occurs - open ticket at support@dhtmlx.com and provide a complete demo where the issue can be reconstructed.