windowsforms-devexpress-dot-xtraspreadsheet-dot-customdrawrowheaderbackgroundeventargs.md
Returns the row index of the column header being painted.
Namespace : DevExpress.XtraSpreadsheet
Assembly : DevExpress.XtraSpreadsheet.v25.2.dll
NuGet Package : DevExpress.Win.Spreadsheet
public int RowIndex { get; }
Public ReadOnly Property RowIndex As Integer
| Type | Description |
|---|---|
| Int32 |
An integer that is the zero-based worksheet row index.
|
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RowIndex 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.
winforms-spreadsheet-custom-draw-example/CS/WindowsFormsApp1/Form1.cs#L223
// Otherwise, paint the row header in white.
Color backColor = e.IsHovered || (e.RowIndex == spreadsheetControl1.ActiveCell.RowIndex) ?
Color.FromArgb(200, 44, 74) : // Color 1
winforms-spreadsheet-custom-draw-example/VB/CustomDrawExample/Form1.vb#L114
' Otherwise, paint the row header in white.
Dim backColor As Color = If(e.IsHovered OrElse (e.RowIndex = spreadsheetControl1.ActiveCell.RowIndex),
Color.FromArgb(200, 44, 74), ' Color 1
See Also
CustomDrawRowHeaderBackgroundEventArgs Class