System.Windows.Forms.DataGridTextBoxColumn.Commit Method

Inititates a request to complete an editing procedure.

Syntax

protected override bool Commit (CurrencyManager dataSource, int rowNum)

Parameters

dataSource
The System.Windows.Forms.CurrencyManager of the System.Windows.Forms.DataGrid control the column belongs to.
rowNum
The number of the edited row.

Returns

true if the value was successfully committed; otherwise, false.

Remarks

The method checks to ensure that an edit is indeed occurring. If so, it formats the value appropriately. If the value is null, the method enters Convert.DBNull into the column; otherwise, it uses the DataGridColumnStyle.SetColumnValueAtRow(CurrencyManager, int, object) method to commit the value.

The method is called by the System.Windows.Forms.DataGrid when an editing operation is committed.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0