ColumnView.GetVisibleIndex(Int32) Method
Returns the visible index of the row specified by its handle.
Namespace: DevExpress.XtraGrid.Views.Base
Assembly: DevExpress.XtraGrid.v24.2.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
row |
Int32 | An integer value representing the row’s handle. |
#Returns
Type | Description |
---|---|
Int32 | An integer value representing the specified record’s visible index. -1 if the specified record is hidden within a collapsed group (in Grid Views). |
#Remarks
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.
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.
Note
Detail pattern Views do not contain data and they are never displayed within Xtra
- Grid
Control. - returns the top most View in a grid;Main View - Grid
Control. - returns the focused View;Focused View - Grid
Control. - returns the currently maximized View;Default View - the sender parameter of View specific events;
- Grid
View. - returns a detail clone View for a specific master row.Get Detail View