This question is locked. New answers and comments are not allowed.
I am referring to the Load-On-Demand demo here: http://demos.telerik.com/silverlight/#TreeView/LoadOnDemand
This is really cool use of the tree control. I like it a lot, and I am using it. However, in the real world, the
private RadTreeViewItem currentItem
causes thread safety issues if you try and expand more than one branch at a time (it only stores the last one clicked.) In my case, I'm going after an async WCF service to get the information, so there is a measurable pause.
Is there a suggested way around this? Somehow I will need to connect the WCF requests to the e.OriginalSource from the TreeView_LoadOn_Demand event. I have two ideas in the works -
1. if there is already a value (!=null) in currentItem, then cancel the load-on-demand event
2. change the currentItem to a hash table of the original node and an identifier which I can associate with the WCF request, and match the two up when the WCF requests return (possibly out of the order in which I made them.)
Ideas welcomed.
Tim
This is really cool use of the tree control. I like it a lot, and I am using it. However, in the real world, the
private RadTreeViewItem currentItem
causes thread safety issues if you try and expand more than one branch at a time (it only stores the last one clicked.) In my case, I'm going after an async WCF service to get the information, so there is a measurable pause.
Is there a suggested way around this? Somehow I will need to connect the WCF requests to the e.OriginalSource from the TreeView_LoadOn_Demand event. I have two ideas in the works -
1. if there is already a value (!=null) in currentItem, then cancel the load-on-demand event
2. change the currentItem to a hash table of the original node and an identifier which I can associate with the WCF request, and match the two up when the WCF requests return (possibly out of the order in which I made them.)
Ideas welcomed.
Tim
