Back to Devexpress

CustomDrawColumnHeaderEventArgs.ColumnIndex Property

windowsforms-devexpress-dot-xtraspreadsheet-dot-customdrawcolumnheadereventargs.md

latest2.3 KB
Original Source

CustomDrawColumnHeaderEventArgs.ColumnIndex Property

Returns the column 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 ColumnIndex { get; }
vb
Public ReadOnly Property ColumnIndex As Integer

Property Value

TypeDescription
Int32

An integer that is the zero-based worksheet column index.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ColumnIndex 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#L135

csharp
if (e.ColumnIndex > 4)
    return;

winforms-spreadsheet-custom-draw-example/VB/CustomDrawExample/Form1.vb#L32

vb
If e.ColumnIndex > 4 Then
    Return

See Also

CustomDrawColumnHeaderEventArgs Class

CustomDrawColumnHeaderEventArgs Members

DevExpress.XtraSpreadsheet Namespace