Categories | Question details Back To List | ||
do not want the leaf.gif image to be shown for the parent row Hi, I am using licensed version of dhtmlxtreeGrid control in split mode. I do not want the leaf.gif image to be shown for the parent row , but the leaf.gif image shown be shown for subrows. How can I do this ? Regards, Lagnajeet Sahu Answer posted by dhxSupport on Mar 11, 2009 04:08 Unfortunately treeGrid hasn't appropriate method which can allow you to disable node images for the particular row. Bu if you know ids of the parent nodes, you can disable it's images via DOM. For example following code will hide item images for all rows which has children: mygrid.loadXML("test_list.xml",function(){ mygrid.forEachRow(function(id){ if (mygrid.hasChildren(id)){ var cell=mygrid.cellById(id,0).cell.firstChild.childNodes[1].style.display="none"; } }) }); Answer posted by Lagnajeet Sahu on Mar 11, 2009 04:25 Hi, I am not creating the rows with xml. I have a dto object that is passed to the client side with asp.net ajax. I am creating the rows using addRow function.
Regards, Lagnajeet Sahu
Answer posted by dhxSupport on Mar 11, 2009 06:47 You should execute code bellow only after grid was fully loaded. You can use "onXLE" event. mygrid.attachEvent("onXLE",function(){ >>I am creating the rows using addRow function. After rows was added to the treeGrid you can catch "onRowAdded" event which containg information about row id which was added: mygrid.attachEvent("onRowAdded",function(id){ mygrid.cellById(id,0).cell.firstChild.childNodes[1].style.display="none"; } |