Back to Devexpress

CustomDrawCellEventArgsBase.Cell Property

windowsforms-devexpress-dot-xtraspreadsheet-dot-customdrawcelleventargsbase.md

latest2.4 KB
Original Source

CustomDrawCellEventArgsBase.Cell Property

Gets the worksheet cell being painted.

Namespace : DevExpress.XtraSpreadsheet

Assembly : DevExpress.XtraSpreadsheet.v25.2.dll

NuGet Package : DevExpress.Win.Spreadsheet

Declaration

csharp
public Cell Cell { get; }
vb
Public ReadOnly Property Cell As Cell

Property Value

TypeDescription
Cell

A Cell object that is the worksheet cell.

|

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

csharp
// Specify the background color for the active cell.
if (e.Cell == spreadsheetControl1.ActiveCell)
{

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

vb
' Specify the background color for the active cell.
If e.Cell Is spreadsheetControl1.ActiveCell Then
    e.BackColor = Color.FromArgb(50, 200, 44, 74)

See Also

CustomDrawCellEventArgsBase Class

CustomDrawCellEventArgsBase Members

DevExpress.XtraSpreadsheet Namespace