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

Tree binding question

2 Answers 61 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Andy Green
Top achievements
Rank 2
Andy Green asked on 16 May 2012, 04:02 PM
Hi

I have a table of data the first 2 columns are Manufacturer and model as varchars.

ie
Manufacturer    Model
Man 1                Mod1
Man 1                Mod 2
Man 1                Mod 3
Man 2                Mod 4
Man 3                Mod 5

Can this be bound such that the top level of the tree shows
Man 1
Man 2
Man 3

And expaned to show the models.

I get an error saying 'This constraint cannort be enabled as not all values have a corresponding parent.
Andy

2 Answers, 1 is accepted

Sort by
0
Accepted
Plamen
Telerik team
answered on 21 May 2012, 02:18 PM
Hello Andy,

 
By default this kind of binding is not supported by RadTreeView but you can add the nodes one by one by checking if RadTreeView already contains such node as it is done in the attached project.

Hope this will be helpful.

Greetings,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Andy Green
Top achievements
Rank 2
answered on 22 May 2012, 03:27 PM
Thanks Plamen

Just what I needed, and a useful code snippet.

Andy
Tags
TreeView
Asked by
Andy Green
Top achievements
Rank 2
Answers by
Plamen
Telerik team
Andy Green
Top achievements
Rank 2
Share this question
or