Hi.
I have TreeView like:
A
AA
AA
B
BB
BB
C
CC
...
Drag/drop is only allowed inside of its group. Ex: AA can be moved anywhere inside A group, BB can be moved anywhere inside B group. Initialy i was stopping drop using previewDragEnded. It worked only in situations when drop position was "inside". If drop position was "after" or "before" RadTreeViewDragEndedEventArgs e.TargetDropItem was always null even though if I check TreeView.TargetDropItem was set correctly (I guess it is a bug? ). I couldnt check it cause TreeView.TargetDropItem is not accesible from code.
My current approach is traverse the tree and set IsDropAllowed property on every item. The problem here are elements whose drop position is "after" or "before" which I try to drop after or before root elements (A, B, C). These root elements doesn't have parent elemnent so I don't see any way to set there IsDropAllowed . So behaviour I have now is: after I drag AA after B I got:
B
BB
BB
AA
I thought about adding additional root element and add current root elements to him but in this case I would have to hide (don't display) the new root element otherwise I would have the same problem as before.
Any help or suggestions would be appreciated.
Best Regards,
Jarek (Xiasma)
I have TreeView like:
A
AA
AA
B
BB
BB
C
CC
...
Drag/drop is only allowed inside of its group. Ex: AA can be moved anywhere inside A group, BB can be moved anywhere inside B group. Initialy i was stopping drop using previewDragEnded. It worked only in situations when drop position was "inside". If drop position was "after" or "before" RadTreeViewDragEndedEventArgs e.TargetDropItem was always null even though if I check TreeView.TargetDropItem was set correctly (I guess it is a bug? ). I couldnt check it cause TreeView.TargetDropItem is not accesible from code.
My current approach is traverse the tree and set IsDropAllowed property on every item. The problem here are elements whose drop position is "after" or "before" which I try to drop after or before root elements (A, B, C). These root elements doesn't have parent elemnent so I don't see any way to set there IsDropAllowed . So behaviour I have now is: after I drag AA after B I got:
B
BB
BB
AA
I thought about adding additional root element and add current root elements to him but in this case I would have to hide (don't display) the new root element otherwise I would have the same problem as before.
Any help or suggestions would be appreciated.
Best Regards,
Jarek (Xiasma)