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
Thanks
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.
i need to get the first row of each band.
This one only returns the first row of the grid.
Thank you for the clarification.
I have another question so I may better assist you with this issue:
What are you trying to achieve after getting the first row of each band? What is the scenario you are trying to handle?
Looking forward to hearing from you.