New to Telerik UI for WinForms? Download free 30-day trial

Tracking changes in RadGridView

You can track row changes in RadGridView by using the following four events: RowsChangingRowsChanged, or the same events can be accessed from the Rows collection - CollectionChanging, CollectionChanged.

You can track cell changes in RadGridView by using CellValueChanged event.

You can track column changes with CollectionChanging, CollectionChanged events which can be accessed from the Columns collection.

RadGridView supports another two editor related events ValueChanging and ValueChanged. Please refer to RadGridView editors section for further details.

CellValueChanged

The event is raised after the cell value is changed and the focus is moved away from the cell.   

RowsChanging

The event fires before the rows collection is changed. GridViewCollectionChangingEventArgs provides further details about the pending change or can be used to cancel the event if you change the Cancel property value to true. GridViewCollectionChangingEventArgs properties are summarized in the following table:

e.Action Indicates the reason for the change. NotifyCollectionChangedAction enumeration specifies the action.
e.Cancel Boolean property indicating whether the event should be canceled. The default value is false and the event is not canceled.
e.GridViewTemplate Specifies the grid view template.
e.NewItems Collection of the new items.
e.NewStartingIndex Indicates the new starting index.
e.OldItems Collection of the old items.
e.OldStartingIndex Indicates the old starting index.

RowsChanged

The event fires after one or more grid rows are changed. GridViewCollectionChangedEventArgs shares most properties of GridViewCollectionChangingEventArgs, besides the Cancel one.

CollectionChanging

CollectionChanging event is a generic event. It can be used for Columns and Rows. The events are accessible from the Columns and Rows collection respectively.

CollectionChanging is equivalent to RowsChanging event.

CollectionChanged

CollectionChanged event is a generic event. It can be used for both Columns and Rows.The events are accessible from the Columns and Rows collection respectively.

CollectionChanged is equivalent to RowsChanged event.

See Also

In this article