Επεξεργασία

Κοινή χρήση μέσω


DataGridTextBoxColumn.Commit(CurrencyManager, Int32) Method

Definition

Initiates a request to complete an editing procedure.

protected public:
 override bool Commit(System::Windows::Forms::CurrencyManager ^ dataSource, int rowNum);
protected internal override bool Commit (System.Windows.Forms.CurrencyManager dataSource, int rowNum);
override this.Commit : System.Windows.Forms.CurrencyManager * int -> bool
Protected Friend Overrides Function Commit (dataSource As CurrencyManager, rowNum As Integer) As Boolean

Parameters

dataSource
CurrencyManager

The CurrencyManager of the DataGrid control the column belongs to.

rowNum
Int32

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 DBNull into the column; otherwise, it uses the SetColumnValueAtRow method to commit the value.

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

Applies to

See also