Skip to main content

RowObjectCustomDrawEventArgs.RowHandle Property

Gets the handle of the row whose corresponding element is being painted.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v24.1.dll

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

Declaration

public int RowHandle { get; }

Property Value

Type Description
Int32

An integer value representing the row handle.

Remarks

When handling the GridView.CustomDrawRowPreview event, the RowHandle property returns the data row handle. This handle identifies the row whose preview section is being painted. When handling either the GridView.CustomDrawGroupRow or GridView.CustomDrawRowFooter event, the RowHandle property returns the group row handle that identifies the painted element. Finally, when handling the GridView.CustomDrawFooter event, the property returns the GridControl.InvalidRowHandle field value. This is becauset the View footer doesn’t correspond to any row.

Use the RowHandle property to identify the painted element and obtain row data. In this case, you can implement conditional painting based on the element position or the row’s data.

The following code snippets (auto-collected from DevExpress Examples) contain references to the RowHandle 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