Skip to main content
A newer version of this page is available. .

CellValueChangedEventArgs Class

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v18.2.dll

Declaration

public class CellValueChangedEventArgs :
    EventArgs

Remarks

The ColumnView.CellValueChanging and ColumnView.CellValueChanged events fire in response to cell value modifications. Thus, CellValueChangedEventArgs class members allow you to identify the cell and obtain its current value. The processed cell is identified by the CellValueChangedEventArgs.RowHandle and CellValueChangedEventArgs.Column properties. The CellValueChangedEventArgs.Value property holds the newly assigned value.

CellValueChangedEventArgs objects with proper settings are automatically created and passed to ColumnView.CellValueChanging and ColumnView.CellValueChanged event handlers.

Example

The following sample code handles the ColumnView.CellValueChanged event to update the FullName column value after the FirstName column value has been changed.

using DevExpress.XtraGrid.Views.Base;
using DevExpress.XtraGrid.Views.BandedGrid;

private void bandedGridView1_CellValueChanged(object sender, CellValueChangedEventArgs e) {
    BandedGridView view = sender as BandedGridView;
    if (view == null) return;
    if (e.Column.Caption != "FirstName") return;
    string cellValue = e.Value.ToString() + " " + view.GetRowCellValue(e.RowHandle, view.Columns["LastName"]).ToString();
    view.SetRowCellValue(e.RowHandle, view.Columns["FullName"], cellValue);
}

Inheritance

Object
EventArgs
CellValueChangedEventArgs
See Also