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
115
UltraGrid - First Band Row
posted

how do i get the first row of the band?

rather than looping through each row returned by GetRowEnumerator, I want to get the first row.

For Each band As UltraGridBand In Me.UltraGrid2.DisplayLayout.Bands

band.Columns("GroupID").Hidden = True
band.Columns("CustID").Hidden = True
band.Columns("GroupMasterID").Hidden = True
'Me.UltraGrid1.DisplayLayout.Bands(i).Columns("GroupCustID").Hidden = True

If band.Index > 0 Then
band.ColHeadersVisible = False
End If

For Each row As UltraGridRow In band.GetRowEnumerator(GridRowType.DataRow)

If String.IsNullOrEmpty(row.Cells("FillCycle").Text) Then
band.Columns("FillCycle").Hidden = True
Else
band.Columns("Name").Hidden = True
End If

Next

Next

Thanks

Parents
  • 18204
    Suggested Answer
    Offline posted

    Hello fatih elmali,

    Thank you for posting in our forums!

    You can access the first row of the first band by accessing the UltraGrid's RowsCollection.  Please see the following code as an example:

    Dim row As UltraGridRow = Me.UltraGrid1.Rows.Item(0)
    row.Selected = True

    If you need further assistance with this, please let me know.

Reply Children