This is a migrated thread and some comments may be shown as answers.

How to get Tree View Child's node Path

3 Answers 248 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
miral shah
Top achievements
Rank 2
miral shah asked on 02 Nov 2009, 03:41 PM
Dear Sir,

Now i m having problem with RadTreeView as i have binded dynamically with class TreeViewFolder but at debug time i m getting parent node only even though i drag and drop from RadGridView to child node . Also i m trying to load image along with dragcue but i m not getting the same. image is only building with color of arrow. I want to have different image valid image when user drag items to valid treeview node or else invalid image for invalid treeview node. Also please let me know how to retrieve the selected item name from the path.

TreeView Looks Like

Personal Folder {Parent Item}
     Inbox    {Child item}
     Outbox {Child item}
     Sent Items {Child item}
     Deleted Items {Child item}

Thanks in advance..


Miral Shah

3 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 06 Nov 2009, 11:09 AM
Hello Miral,

We are sorry for the late response - we just release the Q3.

As a small compensation for our late response we make you an offer - you can send your application (project) to us and we will fix it for you. Please note you should open a Support ticket in order to be able to attach your application.

Looking forward to hear back from you.

Regards,
Ivan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
miral shah
Top achievements
Rank 2
answered on 09 Nov 2009, 03:36 PM
Respected Sir,

If i enable isDragandDrop property then i able to get RadTreeView item onDragInfo which drop my object as child node of that item which is not desired in my application. Also i m unable to get item at OnDropQuery.If i get the same i can handle onDragInfo as per my business logic.  Also i m unable to add my image with dragcue , it overlap with its color.  

Below is my link of my sample application:

1.SliverLight RadTreeView Drag And Drop




Thanks in advance
Miral
0
Miroslav
Telerik team
answered on 17 Nov 2009, 12:13 AM
Hi miral shah,

I am sorry for the delayed reply!

I have attached your modified project to this reply. There are comments in it with how it has been changed.

Here is what I did, based on your post:
Now i m having problem with RadTreeView as i have binded dynamically with class TreeViewFolder...
 - the tree view has been bound, using a hierarchical data template

...but at debug time i m getting parent node only even though i drag and drop from RadGridView to child node .
- now you can drop objects in all folders
  
Also i m trying to load image along with dragcue but i m not getting the same. image is only building with color of arrow.
- an image has been added to the drag cue when dragging an employee, I have used the TreeViewDragCue

I want to have different image valid image when user drag items to valid treeview node or else invalid image for invalid treeview node.
an CanCotnainEmployees property has been added to your class and the drag cue is changed accordingly

 Also please let me know how to retrieve the selected item name from the path
I am not sure which path you refer to here. In your project the Id property has been used as a path and an item is selected by this path.

If i enable isDragandDrop property then i able to get RadTreeView item onDragInfo which drop my object as child node of that item which is not desired in my application.
- When the IsDragDropEnabled property is used for the TreeView it will enable all DragDrop by default. The dropped items are automatically added as children of the collection that the item will use as ItemsSource.
 
Hopefully these modifications will be enough to get you started.

Best wishes,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TreeView
Asked by
miral shah
Top achievements
Rank 2
Answers by
Ivan
Telerik team
miral shah
Top achievements
Rank 2
Miroslav
Telerik team
Share this question
or