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
1310
wingrid display row 0
posted

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)

 

Parents
No Data
Reply
  • 37774
    Suggested Answer
    posted

    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

Children