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

Treeview support Guid for DataFieldID & DataFieldParentID ?

3 Answers 250 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
mfrimu
Top achievements
Rank 1
mfrimu asked on 06 Feb 2009, 07:06 PM
Hello,

I have a table with Guid as Primary key and using ParentID hierarchy. The TreeView doesn't seem to like/render the child nodes....

<telerik:RadTreeView ID="RadTreeView1" Runat="server"   
        DataSourceID="LinqDataSource1" DataFieldID="ItemID"   
        DataFieldParentID="ParentID" DataTextField="Title" >  
   
        <CollapseAnimation Type="OutQuint" Duration="100"></CollapseAnimation> 
        <ExpandAnimation Duration="100"></ExpandAnimation> 
</telerik:RadTreeView> 

My ItemID and ParentID are of type Guid like : b87f0a3f-05d7-442a-8f6b-1496b7a89c38. Forr root nodes, the ParentID = null.

Thanks,

Michael

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 09 Feb 2009, 08:07 AM
Hi mfrimu,

RadTreeView needs Guid.Empty for the root items instead of null.

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
mfrimu
Top achievements
Rank 1
answered on 09 Feb 2009, 05:13 PM
Thanks,

While waiting for your answer I tried changing the Guid fields to standard int64 identity fields, and for some reason, the TreeView does not display the children properly, I get the whole list of items as if all items were at the root level.

Check my screen grabs:
http://www.urbantripper.com/temp/treeview.png

http://www.urbantripper.com/temp/data.png

Thanks,

Michael
0
mfrimu
Top achievements
Rank 1
answered on 09 Feb 2009, 09:43 PM
Tags
TreeView
Asked by
mfrimu
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
mfrimu
Top achievements
Rank 1
Share this question
or