Skip to main content

ColumnView.GetVisibleIndex(Int32) Method

Returns the visible index of the row specified by its handle.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v23.2.dll

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


public virtual int GetVisibleIndex(
    int rowHandle


Name Type Description
rowHandle Int32

An integer value representing the row’s handle.


Type Description

An integer value representing the specified record’s visible index. -1 if the specified record is hidden within a collapsed group (in Grid Views).


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 GetVisibleIndex member must not be invoked for these Views. The GetVisibleIndex 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