Can anyone tell me how to force the ultragrid to display row 0 after I apply my grid filter?
I have tried these with no success--
ultragrid1.DisplayLayout.ActiveRow = ultragrid1.Rows(0)
ultragrid1.ActiveRow = ultragrid1.Rows(0)
ultragrid1.Rows(0).Activate()
ultragrid1.ActiveRow = ultragrid1.GetRow(Infragistics.Win.UltraWinGrid.ChildRow.First)
If you're trying to activate the first row in the set of rows that's been filtered, you need to get a collection of the filtered-in rows; the Rows collection itself on the grid isn't altered when you perform filtering. You could do something like:
Dim rows As Infragistics.Win.UltraWinGrid.UltraGridRow() = Me.UltraGrid1.Rows.GetFilteredInNonGroupByRows() If Not rows Is Nothing And rows.Length > 0 Then rows(0).Activate() End If
-Matt
Matt,
I tried your code and it worked.
much appreciated!
-duane