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
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.
<
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
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.
OC
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.