windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-customrowcelleventargs.md
Returns the currently processed cell value.
Namespace : DevExpress.XtraGrid.Views.Base
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
public object CellValue { get; }
Public ReadOnly Property CellValue As Object
| Type | Description |
|---|---|
| Object |
An object that specifies the currently processed cell value.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the CellValue 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-visualize-data-grid-rows-in-a-chart/CS/ControlRowSourceSample/MainForm.cs#L45
if(e.Column.FieldName == "SalesDynamic")
e.Appearance.ForeColor = Convert.ToDouble(e.CellValue) < 0 ? Color.Red : Color.Green;
}
if (e.Column == _Column) {
int percent = Convert.ToInt16(e.CellValue);
if (percent < 25)
winforms-grid-custom-button-caption-customrowcelledit-event/CS/WindowsApplication1/Form1.cs#L42
private void gridView1_CustomRowCellEdit(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) {
e.RepositoryItem = GetRepositoryItem(e.CellValue);
}
winforms-visualize-data-grid-rows-in-a-chart/VB/ControlRowSourceSample/MainForm.vb#L40
Private Sub OnGridViewRowCellStyle(ByVal sender As Object, ByVal e As RowCellStyleEventArgs)
If Equals(e.Column.FieldName, "SalesDynamic") Then e.Appearance.ForeColor = If(Convert.ToDouble(e.CellValue) < 0, Color.Red, Color.Green)
End Sub
If e.Column Is _Column Then
Dim percent As Integer = Convert.ToInt16(e.CellValue)
If percent < 25 Then
winforms-grid-custom-button-caption-customrowcelledit-event/VB/WindowsApplication1/Form1.vb#L49
Private Sub gridView1_CustomRowCellEdit(ByVal sender As Object, ByVal e As DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs)
e.RepositoryItem = GetRepositoryItem(e.CellValue)
End Sub
See Also