windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-gridcell.md
Gets the column which contains the cell.
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 that represents the column which 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-move-cell-using-drag-drop/CS/Classes/GridViewHelper.cs#L53
sourceGridCell = new GridCell(gridHI.RowHandle, gridHI.Column);
lastMouseDownMoveCell = new GridCell(sourceGridCell.RowHandle, sourceGridCell.Column);
}
{
object value = View.GetRowCellValue(SourceGridCell.RowHandle, SourceGridCell.Column);
GridCell[] selectedCells = View.GetSelectedCells();
winforms-grid-customize-cell-color/CS/CellColorHelper.cs#L51
colors[cell] = value;
_View.RefreshRowCell(cell.RowHandle, cell.Column);
}
winforms-grid-multi-cell-editing/CS/MultiSelectionEditingHelper.cs#L64
int rowHandle = cell.RowHandle;
GridColumn column = cell.Column;
switch(mode) {
winforms-grid-draw-thick-cell-border-directx/CS/Form1.cs#L72
GridViewInfo info = _View.GetViewInfo() as GridViewInfo;
GridCellInfo cellInfo = info.GetGridCellInfo(cell.RowHandle, cell.Column);
return cellInfo.Bounds;
winforms-grid-move-cell-using-drag-drop/VB/Classes/GridViewHelper.vb#L49
sourceGridCell = New GridCell(gridHI.RowHandle, gridHI.Column)
lastMouseDownMoveCell = New GridCell(sourceGridCell.RowHandle, sourceGridCell.Column)
End If
Private Sub CopyCellsValues()
Dim value As Object = View.GetRowCellValue(SourceGridCell.RowHandle, SourceGridCell.Column)
Dim selectedCells() As GridCell = View.GetSelectedCells()
winforms-grid-customize-cell-color/VB/CellColorHelper.vb#L42
colors(cell) = value
_View.RefreshRowCell(cell.RowHandle, cell.Column)
End Sub
winforms-grid-multi-cell-editing/VB/MultiSelectionEditingHelper.vb#L57
Dim rowHandle As Integer = cell.RowHandle
Dim column As GridColumn = cell.Column
Select Case mode
winforms-grid-draw-thick-cell-border-directx/VB/Form1.vb#L68
Dim info As GridViewInfo = TryCast(_View.GetViewInfo(), GridViewInfo)
Dim cellInfo As GridCellInfo = info.GetGridCellInfo(cell.RowHandle, cell.Column)
Return cellInfo.Bounds
See Also