Back to Devexpress

CustomRowCellEventArgs.CellValue Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-customrowcelleventargs.md

latest4.5 KB
Original Source

CustomRowCellEventArgs.CellValue Property

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

Declaration

csharp
public object CellValue { get; }
vb
Public ReadOnly Property CellValue As Object

Property Value

TypeDescription
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

csharp
if(e.Column.FieldName == "SalesDynamic")
        e.Appearance.ForeColor = Convert.ToDouble(e.CellValue) < 0 ? Color.Red : Color.Green;
}

winforms-grid-display-colored-progress-bars/CS/ColoredProgressBar/DifferentRepositoriesProgressBar.cs#L58

csharp
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

csharp
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

vb
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

winforms-grid-display-colored-progress-bars/VB/ColoredProgressBar/DifferentRepositoriesProgressBar.vb#L63

vb
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

vb
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

CustomRowCellEventArgs Class

CustomRowCellEventArgs Members

DevExpress.XtraGrid.Views.Base Namespace