Skip to main content
A newer version of this page is available. .

ColumnView.GetRow(Int32) Method

Returns an object that represents the row in a Grid data source.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v19.2.dll

Declaration

public override object GetRow(
    int rowHandle
)

Parameters

Name Type Description
rowHandle Int32

An integer value representing the desired row handle.

Returns

Type Description
Object

An object representing a specific row.

Remarks

This method’s return value depends on the data source type. If a data source is a DataTable or a DataView, this method returns a DataRowView object. If the data source is a custom list of items, the appropriate list item is returned.

For group rows, the GetRow function returns an object that represents the first data row in the associated group.

Note

In Instant Feedback Mode, the GetRow method returns:

  • a DevExpress.Data.NotLoadedObject object, if a row is not yet loaded;
  • an object the GridControl uses to retrieve row values, if a row is ready.

To identify whether a row has been loaded, call the ColumnView.IsRowLoaded method.

It is recommended that you use the ColumnView.GetRowCellValue method to retrieve row values in Instant Feedback Mode.

See the Accessing Rows in Code. Row Handles section in the Rows topic for more information.

Note

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

The following code snippets (auto-collected from DevExpress Examples) contain references to the GetRow(Int32) method.

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