Hi Guys,
I am having a problem populating a RadTreeView with a Dataset that contains a DataRelation. As I step through the code the DataSet returns two tables and they both contain the correct values I want shown on the form, however, it only displays the first table’s data on my form. I am using the most current version of controls.
The following is a snippet of the source code that contains the problem described above:
| private void LoadTreeView() |
| { |
| DataSet dsData = new DataSet(); |
| int intDocID = 10; |
| tvrDocs.Nodes.Clear(); |
| dsData = AppDocument.GetDocumentTreeView(intDocID); |
| if (dsData != null) |
| { |
| DataColumn parentColumn = dsData.Tables[0].Columns["DocGlobalRuleTypeID"]; |
| DataColumn childColumn = dsData.Tables[1].Columns["DocGlobalRuleTypeID"]; |
| // Create DataRelation. |
| DataRelation drGlobalVar; |
| drGlobalVar = new DataRelation("GlobalVar", parentColumn, childColumn); |
| // Add the relation to the DataSet. |
| dsData.Relations.Add(drGlobalVar); |
| tvrDocs.DataSource = dsData; |
| } |
| dsData.Dispose(); |
| } |
Please let me know what I can do to solve this issue.
Many Thanks,
Mike
