Export (0) Print
Expand All
Expand Minimize

DataGridView::IsCurrentCellDirty Property

Gets a value indicating whether the current cell has uncommitted changes.

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

[BrowsableAttribute(false)]
public:
property bool IsCurrentCellDirty {
	bool get ();
}

Property Value

Type: System::Boolean
true if the current cell has uncommitted changes; otherwise, false.

When the DataGridView is not bound to data, the cell edit is considered committed when the user moves to another cell.

If row headers are visible, a pencil glyph is present in the header for the row that contains a cell with uncommitted changes.

If IsCurrentCellDirty is true and the current cell hosts an editing control, you can retrieve it through the EditingControl property.

The following code example uses the IsCurrentCellDirty property to determine whether to commit a cell value and raise the CellValueChanged event from a handler for the CurrentCellDirtyStateChanged event. 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

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft