Back to Devexpress

RowCellObjectCustomDrawEventArgs.Column Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-rowcellobjectcustomdraweventargs.md

latest3.6 KB
Original Source

RowCellObjectCustomDrawEventArgs.Column Property

Gets the column containing the painted element.

Namespace : DevExpress.XtraGrid.Views.Base

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
public GridColumn Column { get; }
vb
Public ReadOnly Property Column As GridColumn

Property Value

TypeDescription
GridColumn

A GridColumn object (or descendant) representing the column that contains the painted element.

|

Remarks

When handling the GridView.CustomDrawFooterCell or GridView.CustomDrawRowFooterCell event, the Column property identifies the grid column whose footer cell is painted.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Column 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-grid-calculate-custom-summary-based-on-other-summary-values/CS/Q273845/Form1.cs#L41

csharp
{
    if(e.Column == colPrice)
        e.Info.DisplayText = (Convert.ToDecimal(colUnitPrice.SummaryItem.SummaryValue) *

winforms-grid-calculate-custom-summary-based-on-other-summary-values/VB/Q273845/Form1.vb#L36

vb
Private Sub gridView1_CustomDrawFooterCell(ByVal sender As Object, ByVal e As FooterCellCustomDrawEventArgs) Handles gridView1.CustomDrawFooterCell
    If e.Column Is colPrice Then e.Info.DisplayText = (Convert.ToDecimal(colUnitPrice.SummaryItem.SummaryValue) * Convert.ToDecimal(colUnitsInStock.SummaryItem.SummaryValue)).ToString()
End Sub

See Also

CustomDrawFooterCell

CustomDrawRowFooterCell

RowHandle

RowCellObjectCustomDrawEventArgs Class

RowCellObjectCustomDrawEventArgs Members

DevExpress.XtraGrid.Views.Base Namespace