Back to Devexpress

PropertyGridControl.CellValueChanged Event

wpf-devexpress-dot-xpf-dot-propertygrid-dot-propertygridcontrol-c808afa9.md

latest6.0 KB
Original Source

PropertyGridControl.CellValueChanged Event

Occurs after a cell’s value has been changed.

Namespace : DevExpress.Xpf.PropertyGrid

Assembly : DevExpress.Xpf.PropertyGrid.v25.2.dll

NuGet Package : DevExpress.Wpf.PropertyGrid

Declaration

csharp
public event CellValueChangedEventHandler CellValueChanged
vb
Public Event CellValueChanged As CellValueChangedEventHandler

Event Data

The CellValueChanged event's data class is CellValueChangedEventArgs. The following properties provide information specific to this event:

PropertyDescription
HandledGets or sets a value that indicates the present state of the event handling for a routed event as it travels the route. Inherited from RoutedEventArgs.
IsResetGets whether the cell’s property value is reset when a user clicks the Reset context menu’s item. In this case, the PropertyDescriptor.ResetValue(Object) is called.
NewValueGets the new value that is assigned to the cell.
OldValueGets the cell’s previous value that is replaced with the new value.
OriginalSourceGets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.
RoutedEventGets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.
RowGets the row whose value is changed.
SourceGets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.

The event data class exposes the following methods:

MethodDescription
InvokeEventHandler(Delegate, Object)When overridden in a derived class, provides a way to invoke event handlers in a type-specific way, which can increase efficiency over the base implementation. Inherited from RoutedEventArgs.
OnSetSource(Object)When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes. Inherited from RoutedEventArgs.

Remarks

A grid raises the CellValueChanged event after a cell’s value has been changed. The CellValueChanged event doesn’t fire when a cell’s value is changed using the methods provided by a data source.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CellValueChanged event.

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.

wpf-propertygrid-add-an-item-to-a-collection-or-a-dictionary/CS/Dictionary/MainWindow.xaml#L15

xml
<dxprg:PropertyGridControl Name="pGrid" SelectedObject="{Binding Path=CurrentItem, ElementName=grid}" Grid.Column="1"
                           ShowCategories="False" CellValueChanged="pGrid_CellValueChanged" >
</dxprg:PropertyGridControl>

See Also

CellValueChanging

PropertyGridControl Class

PropertyGridControl Members

DevExpress.Xpf.PropertyGrid Namespace