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
340
Auto scroll to bottom of band when expanded
posted

I have a grid containing data with three band levels.  When I expand a band I want to ensure that the lowest record in the child displays in the grid.  Most often the when the band is expanded the child expands below the bottom border of the grid which causes the user to have to scroll down.

Is there a way to have the rows automatically scroll upward so that the last child of the expanded band is visible at the bottom of the grid?

Thanks. Bill

Parents
No Data
Reply
  • 37774
    Verified Answer
    posted

    Bill,

    You could try the ScrollRowIntoView method:

    private void ultraGrid1_AfterRowExpanded(object sender, Infragistics.Win.UltraWinGrid.RowEventArgs e)
    {
        RowsCollection childRows = e.Row.ChildBands[0].Rows;
        this.ultraGrid1.ActiveRowScrollRegion.ScrollRowIntoView(childRows[childRows.Count - 1]);
    }

    -Matt

Children