windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-customrowcelleventargs-c0edc95e.md
Gets the column to which the currently processed cell corresponds.
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 (descendant) representing the column that contains the cell.
|
The following code snippets (auto-collected from DevExpress Examples) contain references 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-highlight-modified-cells/CS/Form1.cs#L32
void gridView1_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e) {
if (CellExists(gridView1.GetDataSourceRowIndex(e.RowHandle), e.Column)) {
e.Appearance.BackColor = Color.ForestGreen;
winforms-grid-customize-cell-color/CS/CellColorHelper.cs#L29
{
Color color = GetCellColor(new MyGridCell(e.RowHandle, e.Column));
if (color.IsEmpty)
private void View_CustomRowCellEdit(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) {
if (e.Column == _Column) {
int percent = Convert.ToInt16(e.CellValue);
winforms-grid-highlight-modified-cells/VB/Form1.vb#L34
Private Sub gridView1_RowCellStyle(ByVal sender As Object, ByVal e As DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs)
If CellExists(gridView1.GetDataSourceRowIndex(e.RowHandle), e.Column) Then
e.Appearance.BackColor = Color.ForestGreen
winforms-grid-customize-cell-color/VB/CellColorHelper.vb#L25
Private Sub _View_RowCellStyle(ByVal sender As Object, ByVal e As RowCellStyleEventArgs)
Dim color As Color = GetCellColor(New MyGridCell(e.RowHandle, e.Column))
If color.IsEmpty Then Return
Private Sub View_CustomRowCellEdit(ByVal sender As Object, ByVal e As CustomRowCellEditEventArgs)
If e.Column Is _Column Then
Dim percent As Integer = Convert.ToInt16(e.CellValue)
See Also