DataGridTextBoxColumn.Commit(CurrencyManager, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.