Populate the XamDataTree with some nodes. Now disable the tree and then re-enable it. It appears that the virtualized nodes are totally messed up or confused. If anyone knows a work around for this, please let me know. Disabling controls and later re-enabling them is very common, especially in our business applications.
Thanks.
HI,
This should be resolved in the latest Service Release.
Sincerely, Matt, Developer Suport Engineer
Sure and sorry for the confusion. “Messed up and confused” is not very explicit, and since it was 3am, perhaps I was the one “Messed up and confused”. As you saw, it failed to enable correctly. I tried to reset it by setting the itemsource to null, and then resetting it back to a collection again. After doing this it looked a bit better and I was able to select one node, but other nodes seemed to be disabled and un-selectable, even though they appeared enabled. This behavior was very unpredictable and not what I would expect – hence the description “Messed up and confused”. Anyway, you saw the behavior and it sounds like it’s already being addressed. Thanks for the prompt responses!
Hi,
I used your sample and managed to reproduce an issue when disabling and after that enabling XamDataTree, however I am not sure what you mean by totally messed up or confused so, if you could clarify that would be helpful.
Anyway, as I mentioned earlier, there is a fix for the issue that I was able to reproduce in a SR which comes out today, so please update to that version and it should be gone.
Let us know if we you have any further issues or questions.
HTH,
While we await the next service release.
Here is some code to disable/enable all the nodes in the tree.
private void TraverseNodes(bool enable, XamDataTreeNodesCollection xdtnc) { foreach (XamDataTreeNode xtn in xdtnc) { xtn.IsEnabled = enable; if (xtn.HasChildren) { TraverseNodes(enable, xtn.Nodes); } }
} private void Button_Click_2(object sender, RoutedEventArgs e) { TraverseNodes(false, xamDataTree1.Nodes); }
private void Button_Click_3(object sender, RoutedEventArgs e) { TraverseNodes(true, xamDataTree1.Nodes); }
Sincerely, Matt Developer Support Engineer
OK thanks. try this.