HOW CAN I SCROLL THE GRID PROGRAMATICALLY IN WPF?

Mark Devid

Total Post:102

Points:714
Posted by  Mark Devid
C# 
C#
 1390  View(s)
Ratings:
Rate this:

How can I scroll the grid programatically in WPF?

  1. Pravesh Singh

    Post:412

    Points:2888
    Re: How can I scroll the grid programatically in WPF?

    Hi Mark,


    Will DataGrid.ScrollIntoView work for you? The first parameter(item) is the element you want to show.

        //

        // Summary:

        //     Scrolls the System.Windows.Controls.DataGrid vertically and horizontally

        //     to display a cell for the specified data item and column.

        //

        // Parameters:

        //   item:

        //     The data item to bring into view.

        //   column:

        //     The column to bring into view.

        public void ScrollIntoView(object item, DataGridColumn column);

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!