I am trying for binding a Relational data from the database to Rad TreeView control.
Ihave taken a Dept table (primary Key table) , Employee table (related with a foriegn key to Dept table and itself has a primary Key column) and Products table (related with a foriegn key to Employee table).
I have tried using RelationBindings.Add() methods but, i didn't get the result.
Please can u tell me how to bind a relational data to a Rad treeview control.
Thank you,
regards,
Mahitha Madala.
8 Answers, 1 is accepted
Thank you for writing.
RelationBinding binding = new RelationBinding("FK_Orders_Customers", this.northwindDataSet.Orders); |
binding.DisplayMember = "OrderID"; |
this.radTreeView1.RelationBindings.Add(binding); |
this.radTreeView1.DisplayMember = "ContactName"; |
this.radTreeView1.DataSource = this.northwindDataSet.Customers; |
Sincerely yours,
Victor
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.
For binding relational data to a Rad tree view i have assigned the datasource by connecting the database , selecting the required tables and using the following code.
Dim
binding As New RelationBinding("FK_Orders_Customers", Me.FKEmpTableDepartmenttableBindingSource)
Me.RadTreeView1.RelationBindings.Add(binding)
Me
.RadTreeView1.DataSource = Me.TestRadDatabaseDataSet1.Department_table
(another way)
Me
.RadTreeView1.DataSource = Me.DepartmenttableBindingSource
Me.RadTreeView1.RelationBindings.Add(New RelationBinding("ArtistsAlbums", Me.Emp_TableTableAdapter.))
Me.RadTreeView1.RelationBindings.Add(New RelationBinding("AlbumsSongs", Me.FKProductsEmpTableBindingSource))
Me.RadTreeView1.RootRelationDisplayName = "Artists"
In the above senario i can see only the parent table information displayed in the treeview but not the child tables informations.
Please can anyone suggest any other way or any other properties to be set.
thank you,
regards,
Mahitha Madala.
Dim
ordersCustomers
As
RelationBinding =
New
RelationBinding(
"FK_Orders_Customers"
,
Me
.NorthwindDataSet.Orders)
ordersCustomers.DisplayMember =
"OrderID"
Me
.RadTreeView1.RelationBindings.Add(ordersCustomers)
Me
.RadTreeView1.DisplayMember =
"ContactName"
Me
.RadTreeView1.DataSource =
Me
.NorthwindDataSet.Customers
Me
.RadTreeView1.RootRelationDisplayName =
"Customers"
Sincerely yours,
Victor
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.
Its working. Its great, thanks for all your replies.
regards,
Mahitha Madala
Is it possible to bind RAD Tree Control to a MDX query.
Please provide an example/demo.
Thanks n Regards,
Rashmi
Thank you for the question.
RadTreeView currently does not officially support multi-dimensional data sets and has not been tested in such a scenario. If the result of your MDX query supports the IList interface, RadTreeView will have no troubles generating a view for the data, but it is not guaranteed that the result will look intuitive.
Write again if you have other questions.
Victor
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
If it is also a writing binding does it support drag and drop?
Thank you for this question. Yes we support drag & drop, however RadTreeView does not modify the underlying data source. Its purpose is only to display the data. If you have further questions, please do not hesitate to write back.
All the best, Jack
the Telerik team