windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-rowcellcustomdraweventargs-b788efd9.md
Provides information on the painted cell.
Namespace : DevExpress.XtraGrid.Views.Base
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
public object Cell { get; }
Public ReadOnly Property Cell As Object
| Type | Description |
|---|---|
| Object |
A DevExpress.XtraGrid.Views.Grid.ViewInfo.GridCellInfo object that contains information about the painted cell.
|
The following code snippets (auto-collected from DevExpress Examples) contain references 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-grid-show-editor-buttons-on-cell-hover/CS/WindowsApplication3/Form1.cs#L40
if(e.Column.FieldName == "Text" && e.RowHandle == rowHandle) {
GridCellInfo cellInfo = e.Cell as GridCellInfo;
ButtonEditViewInfo info = cellInfo.ViewInfo as ButtonEditViewInfo;
winforms-grid-change-color-of-highlighted-search-results/CS/WindowsApplication3/Main.cs#L28
if (view.OptionsFind.HighlightFindResults && !view.FindFilterText.Equals(string.Empty)) {
DevExpress.XtraGrid.Views.Grid.ViewInfo.GridCellInfo cellInfo = ((DevExpress.XtraGrid.Views.Grid.ViewInfo.GridCellInfo)e.Cell);
if (cellInfo != null && cellInfo.ViewInfo != null && cellInfo.ViewInfo.HasMatchedString) {
winforms-grid-show-editor-buttons-on-cell-hover/VB/WindowsApplication3/Form1.vb#L43
If e.Column.FieldName = "Text" AndAlso e.RowHandle = rowHandle Then
Dim cellInfo As GridCellInfo = TryCast(e.Cell, GridCellInfo)
Dim info As ButtonEditViewInfo = TryCast(cellInfo.ViewInfo, ButtonEditViewInfo)
winforms-grid-change-color-of-highlighted-search-results/VB/WindowsApplication3/Main.vb#L30
If view.OptionsFind.HighlightFindResults AndAlso Not view.FindFilterText.Equals(String.Empty) Then
Dim cellInfo As DevExpress.XtraGrid.Views.Grid.ViewInfo.GridCellInfo = (CType(e.Cell, DevExpress.XtraGrid.Views.Grid.ViewInfo.GridCellInfo))
If cellInfo IsNot Nothing AndAlso cellInfo.ViewInfo IsNot Nothing AndAlso cellInfo.ViewInfo.HasMatchedString Then
See Also
RowCellCustomDrawEventArgs Class