Dim view As New Infragistics.Web.UI.DataSourceControls.DataView() ' Add the parent view view.DataSourceID = Me.SqlDataSource1.ID view.ID = "Parent_DataSource_View1" Me.WebHierarchicalDataSource1.DataViews.Add(view) ' Add child view 1 view = New Infragistics.Web.UI.DataSourceControls.DataView() view.DataSourceID = Me.SqlDataSource2.ID view.ID = "Child_DataSource_View1" Me.WebHierarchicalDataSource1.DataViews.Add(view) ' Add child view 2 view = New Infragistics.Web.UI.DataSourceControls.DataView() view.DataSourceID = Me.SqlDataSource3.ID view.ID = "Child_DataSource_View2" Me.WebHierarchicalDataSource1.DataViews.Add(view) ' Add the relation of the first child to the parent Dim dr As New Infragistics.Web.UI.DataSourceControls.DataRelation() dr.ParentDataViewID = "Parent_DataSource_View1" dr.ParentColumns = New String() {"RegionID"} dr.ChildDataViewID = "Child_DataSource_View1" dr.ChildColumns = New String() {"RegionID"} Me.WebHierarchicalDataSource1.DataRelations.Add(dr) ' Add the relation of the second child to the parent dr = New Infragistics.Web.UI.DataSourceControls.DataRelation() dr.ParentDataViewID = "Parent_DataSource_View1" dr.ParentColumns = New String() {"RegionID"} dr.ChildDataViewID = "Child_DataSource_View2" dr.ChildColumns = New String() {"RegionID"} Me.WebHierarchicalDataSource1.DataRelations.Add(dr)