We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Determining which heirarchy a row is in

Hi, I have a grid with multiple heirarchies. Can someone please explain to me how, In the prepareviewstyleinfo event, I can tell if the current row is a ''main'' row, or one linked to the linked/child table... I''m setting up the grid like this. Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim oOrders As New clsOrders Me.grd.DataSource = oOrders Me.grd.Binder.SetDataBinding(oOrders, "") Dim childrenLevel As GridHierarchyLevel = Me.grd.Binder.AddRelation("Details") childrenLevel.ShowHeaders = True Me.grd.Binder.RootHierarchyLevel.ShowHeaders = True Me.grd.DataSource = oOrders End Sub Thanks in advance, Damien

1 Reply

AD Administrator Syncfusion Team March 31, 2005 08:02 AM UTC

You can get the GridBoundRecordState for a given row index. This object has the information you need about the Hierarchical state of a row. It has a member LevelIndex. Dim state As GridBoundRecordState = Me.gridDataBoundGrid1.Binder.GetRecordStateAtRowIndex(e.RowIndex)

Loader.
Live Chat Icon For mobile
Up arrow icon