Categories | Question details Back To List | ||||||||||||||
Grid linked to tree Hi, I have tried in Grid linked to tree for category column. But i want one more subTree for location. Is it possible? Please help me. It is very urgent. Thanks & Regards, P.Subathra Answer posted by Alex (support) on Sep 02, 2009 09:41 Hello, you can initialize a new tree for location column and link it by setSubTree method to the column: grid.setSubTree(tree_category,column_index1); grid.setSubTree(tree_location,column_index2); Answer posted by Subathra on Oct 19, 2009 03:40 Hi, I have generated the xml file. It contains category id,location id,impact and criticality id. In edit mode, i want to retain all the existing values in Grid. But category values are retained in grid. My code is mentioned below. tree2=new dhtmlXTreeObject("treeboxbox_tree2","100%","100%",0); tree2.setImagePath("themes/General/css/imgs/csh_winstyle/"); var filename2="location.xml"; tree2.loadXML(filename2); tree3=new dhtmlXTreeObject("treeboxbox_tree3","100%","100%",0); tree3.setImagePath("themes/General/css/imgs/csh_yellowbooks/"); tree3.loadXML("_impactmaster.xml"); tree4=new dhtmlXTreeObject("treeboxbox_tree4","100%","100%",0); tree4.setImagePath("themes/General/css/imgs/csh_bluebooks/"); var filename4="criticality.xml"; tree4.loadXML(filename4); tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0); tree.setImagePath("themes/General/css/imgs/csh_bluefolders/"); var filename="category.xml"; tree.loadXML(filename,function(){ /* Grid file declaration here. */ }); Thanks & Regards, P.Subathra Answer posted by Alex (support) on Oct 19, 2009 05:08 Hello, in this case you should attach each tree to a certain column. For example: grid.setColTypes("ed,stree,stree,stree,stree"); Answer posted by Subathra on Oct 19, 2009 06:25 Hi Alex, Yes, I have done this work and tree is also displaying in that cell. My doubt is " If values (location, category) are already exists in my db then it is coming in my grid xml and i have to display the value in that cell when it is match with tree xml else it should be display empty, but in category column values are only retained (my first sub tree column) and i want to display other columns also. Is it possible? Please help me. Thanks in advance. Regards, P.Subathra Answer posted by Alex (support) on Oct 19, 2009 07:09 Grid should be loaded after all trees are loaded: tree.loadXML(filename,loadTree2); Answer posted by Subathra on Oct 19, 2009 22:02 Hi Alex, I have tried what you have mentioned, but still it is not working for other columns. Shall i send my code for you? Herewith i have attached my xml file with my screen shot page. Thanks in Advance. Regards, P.Subathra Attachments (2)
Answer posted by Alex (support) on Oct 20, 2009 02:11 Hello, yes, please provide the complete demo where can recreate the issue to support@dhtmlx.com |