Categories | Question details Back To List | ||
dhtmlxtree and checkboxes I have a tree hierarchy with about 1500 entries. The hierarchical tree is built with dhtmlxtree. I am using checkboxes to indicate to the user whether a particular item in the tree is enabled or disabled. xml is constructed on the server side. The enabled/disabled state is stored in the database. In a given user session, I want to be able to persist only the changes that user made. For example, say nodes 1,3,5 were disabled (checkbox unchecked) and 2, 4 were enabled (checkbox checked). User comes in and checks (enables) 1,3 and unchecks (disables) 4. I want to update the database only for nodes 1,3,4. How do I accomplish this with the APIs provided? I see getAllChecked(), getAllCheckedBranches(), so on so forth, but no API to indicate the only ones that has changed. The dataProcessor works only when I edit the text, not when I click the checkbox. Any help would be appreciated. Thanks MP Answer posted by Support on Mar 25, 2008 03:03 You can trigger dataprocessor's updates by next code tree.attachEvent("onCheck",function(id,state){ // code executed when checkbox state changed dataProcessor.setUpdated(id,true,true); // mark row as updated, and trigger data sending }) |