Skip to main content

DataViewBase.TopRowIndex Property

Gets or sets the index of the top visible row.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

[Browsable(false)]
public int TopRowIndex { get; set; }

Property Value

Type Description
Int32

An integer value that specifies the index of the top visible row.

Remarks

Use the TopRowIndex property to scroll the view and display the specified row at the top of the view in code. Setting the TopRowIndex property to a negative value automatically sets the TopRowIndex property to 0. Setting the TopRowIndex property to a value greater than the maximum allowed top row index automatically sets the TopRowIndex property to the maximum allowed top row index.

To learn more, see Identifying Rows and Cards and Focus and Navigation.

Note

In master-detail mode, the TopRowIndex property returns the index calculated against both master and detail rows.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the TopRowIndex property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also