windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-rowcellobjectcustomdraweventargs.md
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
public GridColumn Column { get; }
Public ReadOnly Property Column As GridColumn
| Type | Description |
|---|---|
| GridColumn |
A GridColumn object (or descendant) representing the column that contains the painted element.
|
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
{
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
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
RowCellObjectCustomDrawEventArgs Class