I detect inconsistencies between nodes selected and DynaTree.SelectNodes properties. If you add Nodes with Select = True to a DynaTree, these nodes are not counted in DynaTree.SelectNodes.Count. This occurs before a user check or uncheck a node in the web page.
Other problem is that the value of Node.Select does not match if the node is marked or not on page
Attached is a demo that add three nodes two of them with Select := True, but SelectedNodes.Count is zero. This is correct after the user check or uncheck any node in the web page. But, by counting the number of nodes marked, the value does not match the number of nodes checked on the web page.
- Code: Select all
Result := 0;
for i:=0 to DynaTree.Nodes.Count-1 do
if DynaTree.Nodes[i].Select then
Result := Result + 1;
In the demo you will see that Result = 2 (the number of nodes selected on load), independent of the number of nodes checked or unchecked that are shown on the web page.
(this was tested on version 2.9.0.263)
TIA,
Ricardo