Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1165
Databinding Self-Referencing WinTree in OutlookExpress
posted

When I try to bind my datasource to a WinTree control, I get a result for Standard and Grid View Styles, but just a big blank for OutlookExpress.  The OE style is what I want, since my data is homogenous and recursive.

Below is my code.  Also, when I try to hide the redundant root-level nodes, there are no node cells in my tree when I get to the InitializeDataNode event, so it generates an error.  This is true regardless of the ViewStyle I'm using.  Even without the InitializeDataNode code, my tree view is blank in OE.

 

 

 

 

 

 

 

 

Dim

 

 

dsViewNodes As New DataSet

dsViewNodes = _dataDepartmentMaster.GetViewNodes

 

 

 

Dim r1 As New DataRelation("R1", dsViewNodes.Tables(0).Columns("PK_Department"), dsViewNodes.Tables(0).Columns("Parent_Department_PK"))

dsViewNodes.Relations.Add(r1)

 

 

 

With utDepartment

 

 

 

.ViewStyle = Infragistics.Win.UltraWinTree.

 

ViewStyle.OutlookExpress

utDepartment.SetDataBinding(dsViewNodes,

 

"table")

 

 

 

 

 

 

End With