Categories | Question details Back To List | ||
2 problems with "Editable items" in tree Hello, We have the professional version of dhtmlx2.1. The first problem: Double clicking on an editable item will close the selected item. http://www.dhtmlx.com/docs/products/dhtmlxTree/samples/nodes_manipulation/pro_edit.html - open the item "Books" - double click this item and it will be closed :( This problem does not exist in version "dhtmlxTree_v13_pro_61020". The second problem: "tree.setChildCalcMode("childrec");" If you edit (double click) an item without a child, the parent item counter raises by 1 for this item. Would you kindly help me, please. Best regards, Stefan Renneke Answer posted by Alex (support) on May 11, 2009 01:51 Hello, by default tree nodes can be opened/closed by double click. In order to disable this action you can try to use onDblClick event handler: tree.attachEvent("onDblClick",function(id){ return false }) Answer posted by Alex (support) on May 11, 2009 07:49 The issue with tree.setChildCalcMode("childrec"); is confirmed and fixed. Please, contact us at support@dhtmlx.com, provide your ref number - and we'll send you the fix.
Answer posted by Stefan Renneke on May 11, 2009 10:31 It works well. Thanks for the help. Answer posted by Stefan Renneke on May 11, 2009 16:15 I habe the next problem with "tree.setChildCalcMode("childrec");" and "Double clicking on an editable item". I wanna compare the item value before and after editing. In stage 0 of the "onEdit" - event the value of editor contains the "[numer of all childs]", but "ChildCalcMode" is not a part of the item text attribute! Can you help me, please? Answer posted by Alex (support) on May 12, 2009 01:24 Hello, The fourth parameter of the onEdit handler (value) is innerHTML of edited item. Calculating number is part of this html. To exclude it you can apply the following replacement: value = value.replace(/\[[^\]]*\]/,""); |