C1Flexgrid: scroll to bottom programmatically?

Posted by: jon.tapp on 23 November 2021, 8:20 pm EST

    • Post Options:
    • Link

    Posted 23 November 2021, 8:20 pm EST

    I am adding a row to a grid with a button click. I am using unbound mode. The row adds to the grid fine, but the grid does not scroll to the bottom so the user can see that its added without dragging down the scroll bar. Is there a way to force the grid to scroll to the bottom with code after my program adds a row?

  • Posted 24 November 2021, 1:29 am EST

    Hi Jon,

    You can use FlexGrid’s ScrollIntoView method to manually scroll to any row/column as follows:

    
    private void Button_Click(object sender, RoutedEventArgs e)
    {
                FlexGrid.Rows.Add(new Row());
                FlexGrid.ScrollIntoView(FlexGrid.Rows.Count-1, 0);
     }
    
    

    Best Regards,

    Kartik

  • Posted 24 November 2021, 1:25 pm EST

    Works just like I needed! Thanks!

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels