i am trying to add an item after / before of selected item in a tree view,
how can i achieve this, and also moving items up and down using move up and down button
3 Answers, 1 is accepted
answered on 17 Feb 2014, 05:18 PM
Could you please elaborate some more on your particular scenario? Any snapshots, examples on the desired outcome will be greatly appreciated.
Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).
I have attached a screen shot which is showing a place holder when dragging after / before, i want to achieve similar to that. and also want to add item to any specific location in the tree view, lets say add an item next to selected item.
answered on 19 Feb 2014, 04:51 PM
As far as I understood what you have in mind you need to be able to drag and drop RadTreeViewItems before / after other TreeViewItems. In order to do that you need to set the IsDragDropEnabled property to "True", by doing so you activate the built-in support for DragDrop in the RadTreeView.
Please note that if you are using a data-bound RadTreeView you may need to implement custom drag and drop logic in order to copy your business items (like it's shown in the SDK example).
More information about the DragDrop feature of the RadTreeView you can find in the following articles:
You can also check out the Drag and Drop section under How To in the RadTreeViewdocumentation
From your screen shot I'm not entirely sure do you want to leave an empty space when you move an item?
As for the second part of your question where you mention that you need to add for example an item next to the select one, is this somehow related to the drag drop process or it is a separate requirement that can be performed programmatically ?