Page 1 of 1

MultiHier checkbox and Dynamic children problem

PostPosted: 30 Apr 2016 18:45
by Ricardo Muñoz
It seems that ISuperObject.B['select'] does not reflect the checkbox state of the corresponding TIWCGJQDynaTreeNode.Select.

I'm using a DynaTree with static root nodes and dynamic children. And JQDynaTreeOptions.SelectMode := jqdtsMultiHier. If you check a node with his children previously loaded (the parent node was expanded previously), the node and all its children are marked. But, when the parent node has not been expanded (the children have not been charged yet), if you check the parent node and then expand it, their children are not checked.

To solve this, in the OnGetChildrenNodes event I'm using this
Code: Select all
JQDynaTreeGetChildrenNodes(Sendre: TObject; ANodeData: ISuperObject; var AJSon: ISuperObject);
...
  if (JQDynaTree1,JQDynaTreeOptions.SelectMode = jqdtsmMultiHier) and (ANodeData.B['select']) then
    JSonObj.B['select'] := True;
...


But, ANodeData.B['select'] is false although the node is checked, it was checked by the user clicking in the checkbox.

If I use the same code but check the parent node when it is loaded statically (TreeNode.Select := True), ANodeData.B['select'] is True in the OnGetChildrenNodes event. But, ANodeData.B['select'] is true although the node is unchecked by the user in the web page.

TIA,
Ricardo

Re: MultiHier checkbox and Dynamic children problem

PostPosted: 03 May 2016 16:09
by Alexander Bulei
Hi Ricardo Muñoz,

You mean, the ANodeData.B['select'] doesn't react with user interaction?

Best Regards.

Re: MultiHier checkbox and Dynamic children problem

PostPosted: 03 May 2016 18:24
by Ricardo Muñoz
Hi Alexander,

Alexander Bulei wrote:Hi Ricardo Muñoz,

You mean, the ANodeData.B['select'] doesn't react with user interaction?

Best Regards.


Sorry, maybe my english is not so good. Attached there is an example. You will see that ANodedata.B['select'] has the value that was assigned when the nodes are created, and this did not change although the node is checked or unchecked on the web page. To see that, you should check or uncheck the node before expand it.

TIA,
Ricardo

Re: MultiHier checkbox and Dynamic children problem

PostPosted: 04 May 2016 17:40
by Alexander Bulei
Hi Ricardo Muñoz,
Thanks for simple testcase.
We found the problem and fixed in next beta release.

Best Regards.