DataGrid.ScrollIntoView Method

Definition

Scrolls the DataGrid vertically and horizontally to display the specified item.

Overloads

ScrollIntoView(Object)

Scrolls the DataGrid vertically to display the row for the specified data item.

ScrollIntoView(Object, DataGridColumn)

Scrolls the DataGrid vertically and horizontally to display a cell for the specified data item and column.

ScrollIntoView(Object)

Scrolls the DataGrid vertically to display the row for the specified data item.

C#
public void ScrollIntoView(object item);

Parameters

item
Object

The data item to bring into view.

Exceptions

item is null.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

ScrollIntoView(Object, DataGridColumn)

Scrolls the DataGrid vertically and horizontally to display a cell for the specified data item and column.

C#
public void ScrollIntoView(object item, System.Windows.Controls.DataGridColumn column);

Parameters

item
Object

The data item to bring into view.

column
DataGridColumn

The column to bring into view.

Remarks

If column is null, only a vertical scroll is performed. If item is null, only a horizontal scroll is performed.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10