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

self-referencing RadTreeView with OpenAccessDataSource

5 Answers 109 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dmitry
Top achievements
Rank 1
Dmitry asked on 23 Nov 2008, 10:36 PM

Hello,

I’veexperienced a trouble with the cooperation of the OpenAccessDataSource and theRadTreeView. I tried to do self-referencing hierarchical data binding. When I was usingSqlDataSource it worked fine.  But afterI had switched to OpenAccessDataSource it showed me a list instead of ahierarchy view.  DataFieldId andDataFieldParentId fields in the RadTreeView configuration were correct for theboth cases. How can I get this working?

5 Answers, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 24 Nov 2008, 11:03 AM
Hello Dmitry,

Can you send me your example project?

Best wishes,
Jan Blessenohl
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
OC
Top achievements
Rank 2
answered on 30 Mar 2009, 12:17 PM
Having same problem... Can't se any logical reason for this not to work...

<

 

telerik:RadTreeView ID="RadTreeView1" Runat="server" DataFieldID="ID" DataFieldParentID="ParentID"

 

 

DataSourceID="OpenAccessDataSource1" DataTextField="InterntNavn" MaxDataBindDepth="9"

 

 

Skin="Vista" DataValueField="ID">

 

 

<DataBindings>

 

 

<telerik:RadTreeNodeBinding TextField="InterntNavn" Depth="9" ValueField="ID"

 

 

ToolTipField="ParentID" />

 

 

</DataBindings>

 

</

 

telerik:RadTreeView>

 

<

 

telerik:OpenAccessDataSource ID="OpenAccessDataSource1" runat="server"

 

 

ObjectContextProvider="DataLag.ObjectScopeProvider1, DataLag"

 

 

TypeName="DataLag.Kategori" Where="" EnableDelete="False"

 

 

EnableInsert="False" EnableUpdate="False" ContextTypeName="" OrderBy="Sortering">

 

</

 

telerik:OpenAccessDataSource>

OC

 

0
Zoran
Telerik team
answered on 30 Mar 2009, 01:50 PM
Hi Mutantmannen,

Have you checked our KB article covering this scenario. I think it should be helpful for you to manage with your task. I'd also recommend you downloading the code-library sample project where this is demonstrated.

If you require any further assistance please feel free to contact us back.

All the best,
Zoran
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
OC
Top achievements
Rank 2
answered on 30 Mar 2009, 07:28 PM
Thanks, this works, but have one huge drawback, all nodes is repeated at the root level. I don't want that. They should only display in the hierarcy where they're supposed to be.

OC
0
Zoran
Telerik team
answered on 31 Mar 2009, 02:57 PM
Hi Mutantmannen,

This issue should be solved in the filter part of the datasource. The filtering column should be the one that defines the hierarchy and the filtering argument should be null. For example in the employee table the data should be filtered by ReportsTo and the source for the filter should be none. That way the treeview will present only the instance of the employee that has no boss (no one to report to) at root level.

If you still have problems achieving this you could send us a sample project and we will be glad to do this small implementation for you.

Best wishes,
Zoran
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Dmitry
Top achievements
Rank 1
Answers by
Jan Blessenohl
Telerik team
OC
Top achievements
Rank 2
Zoran
Telerik team
Share this question
or