Home > DeveloperSection > Forums > How can I scroll the grid programatically in WPF?
Mark Devid
Mark Devid

Total Post:101

Points:707
Posted on    January-23-2014 12:07 AM

 C# C# 
Ratings:


 1 Reply(s)
 985  View(s)
Rate this:

How can I scroll the grid programatically in WPF?



Pravesh Singh

Total Post:411

Points:2881
Posted on    January-23-2014 1:06 AM

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);


Don't want to miss updates? Please click the below button!

Follow MindStick