Skip to main content

ColumnView.GetVisibleRowHandle(Int32) Method

Returns the handle of the row which is displayed at the specified position.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v24.1.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation


public virtual int GetVisibleRowHandle(
    int rowVisibleIndex


Name Type Description
rowVisibleIndex Int32

An integer value specifying the row’s visible index.


Type Description

An integer value representing the corresponding row handle. Row handles are not data source indexes, see the Accessing Rows in Code. Row Handles section of the “Rows” article for more information. The GridControl.InvalidRowHandle value is returned if an invalid index is passed as the parameter.


Visible indexes reflect the order in which data records, group rows, the auto filter row and the new item row are displayed within a View (the auto-filter row and group rows are supported only in Grid Views and their descendants). In Grid Views, rows can be hidden within collapsed groups. These rows are not indexed.

Data row handles start from zero and specify the order in which rows are displayed within a View. Group row handles are negative and start from -1. If grouping is not applied, row handles and visible indexes match.

To obtain the handle of a row by its visible index, use the ColumnView.GetVisibleRowHandle method.

The following image illustrates row handles and the corresponding visible indexes for a sample Grid View in group mode.

Concepts - IdentifyRows - Group

In this example, it’s assumed that the “City: Salzburg” group row contains two nested data rows. So the bottom-most data row (“Ipoh Coffee - 30 - $1,104.00”) has the row handle equal to 4, not 2.

See the Accessing Rows in Code. Row Handles section in the Rows topic to learn more.


Detail pattern Views do not contain data and they are never displayed within XtraGrid. So, the GetVisibleRowHandle member must not be invoked for these Views. The GetVisibleRowHandle member can only be used with Views that display real data within the Grid Control. Use the following methods to access these Views with which an end user interacts at runtime.

See Also