Create a Tree in ultra grid control

Downloads:1071 Bookmark this code Bookmark and Share
Rank : Not rated yet
Rated by : 0 user(s)
Developer:Bilal Yousaf  |   5 submission(s)
Date Uploaded:May 02,2008
Level:Advanced
Size: 0 Bytes
Category:VB.Net -> Miscellaneous
Developer Says:

you can create a tree in Ultra grid the child record will display in drill down list.

 Public Sub LoadList()
            Try
                'Getting the datea From DAtabase from inner layer Model 
                tab = MODEL.BasicData.Session.GetSessoin()
                Dim tabSessionClasses As DataTable = MODEL.BasicData.SessionClasses.GetSessionClassforSection
                Dim tabClassesSection As DataTable = MODEL.BasicData.SectionClasses.GetClassesSection
                ' Dim tabClassesSubject As DataTable = MODEL.BasicData.ClassesSubjects.GetClassesSubjects
 
                Dim DataSet As New DataSet
 
                DataSet.Tables.Add(tab)
                DataSet.Tables.Add(tabSessionClasses)
                DataSet.Tables.Add(tabClassesSection)
                'DataSet.Tables.Add(tabClassesSubject)
 
                Dim relSessionClasses As New DataRelation("SessionClasses" _
                                    , DataSet.Tables("Table1").Columns("SessionID") _
                                    , DataSet.Tables("Table2").Columns("SessionID"))
 
                DataSet.Relations.Add(relSessionClasses)
 
 
                Dim relSectionClasses As New DataRelation("SectionClasses" _
                                                    , DataSet.Tables("Table2").Columns("SessionClassID") _
                                                    , DataSet.Tables("Table3").Columns("SessionClassID"))
 
                DataSet.Relations.Add(relSectionClasses)
 
                'Dim relClassesSubjects As New DataRelation("relClassesSubjects" _
                '                                    , DataSet.Tables("Table3").Columns("SectionClassID") _
                '                                    , DataSet.Tables("Table4").Columns("SectionClassID"))
 
                'DataSet.Relations.Add(relClassesSubjects)
 
                grdList.DataSource = DataSet
                grdList.DataBind()
 
                grdList.DisplayLayout.Bands(0).Columns(0).Hidden = True
                grdList.DisplayLayout.Bands(0).Columns(1).Hidden = True
 
                grdList.DisplayLayout.Bands(1).Columns(0).Hidden = True
                grdList.DisplayLayout.Bands(1).Columns(1).Hidden = True
                grdList.DisplayLayout.Bands(1).Columns(2).Hidden = True
                grdList.DisplayLayout.Bands(1).Columns(4).Hidden = True
 
                grdList.DisplayLayout.Bands(2).Columns(0).Hidden = True
                grdList.DisplayLayout.Bands(2).Columns(1).Hidden = True
                grdList.DisplayLayout.Bands(2).Columns(2).Hidden = True
 
 
            Catch ex As Exception
                Throw (New Exception("There was an error loading Session Classes list.", ex))
            End Try
 
End Sub

The above code was highlighted with Neat Highlighter


User Reviews
There are no user reviews on this code
Leave a Comment
Age (Required, will not be shown)
Name
Email (Required, will not be shown)
Website (Optional, starting with http://)
 
Rate this code
Poor   1 2 3 4 5   Outstanding
Are you human ?

Enter the code shown above