DataGridView::CurrentCellDirtyStateChanged Event

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Occurs when the state of a cell changes in relation to a change in its contents.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
event EventHandler^ CurrentCellDirtyStateChanged {
	void add(EventHandler^ value);
	void remove(EventHandler^ value);
}

A cell is marked as modified if its contents have changed but the change has not been saved.

This event typically occurs when a cell has been edited but the change has not been committed to the data cache, or when an edit operation is canceled.

For more information about handling events, see NIB: Consuming Events.

The following code example demonstrates how to handle the CurrentCellDirtyStateChanged event. In this example, the event handler calls the CommitEdit method to raise the CellValueChanged event and determine the current value of a DataGridViewCheckBoxCell. This code example is part of a larger example provided in How to: Disable Buttons in a Button Column in the Windows Forms DataGridView Control.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: