DataGridTextBoxColumn::Commit Method (CurrencyManager^, Int32)

 
Use BaseTrue

Inititates a request to complete an editing procedure.

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

public protected:
virtual bool Commit(
	CurrencyManager^ dataSource,
	int rowNum
) override

Parameters

dataSource
Type: System.Windows.Forms::CurrencyManager^

The CurrencyManager of the DataGrid control the column belongs to.

rowNum
Type: System::Int32

The number of the edited row.

Return Value

Type: System::Boolean

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

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.

.NET Framework
Available since 1.1
Return to top
Show: