Back to Devexpress

CustomDrawRowHeaderBackgroundEventArgs.RowIndex Property

windowsforms-devexpress-dot-xtraspreadsheet-dot-customdrawrowheaderbackgroundeventargs.md

latest2.6 KB
Original Source

CustomDrawRowHeaderBackgroundEventArgs.RowIndex Property

Returns the row index of the column header being painted.

Namespace : DevExpress.XtraSpreadsheet

Assembly : DevExpress.XtraSpreadsheet.v25.2.dll

NuGet Package : DevExpress.Win.Spreadsheet

Declaration

csharp
public int RowIndex { get; }
vb
Public ReadOnly Property RowIndex As Integer

Property Value

TypeDescription
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

csharp
// 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

vb
' 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

CustomDrawRowHeaderBackgroundEventArgs Members

DevExpress.XtraSpreadsheet Namespace