When overridden in a derived class, initiates a request to complete an editing procedure.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
protected internal abstract bool Commit( CurrencyManager dataSource, int rowNum )
- Type: System.Windows.Forms.CurrencyManager
- Type: System.Int32
The number of the row being edited.
Return ValueType: System.Boolean
true if the editing procedure committed successfully; otherwise, false.
The method should be used by classes derived from the DataGridColumnStyle class to reset their editing state, for example, to concede the focus if the DataGridColumnStyle hosts an editing control. See the ConcedeFocus method.
Call the method when the DataGridColumnStyle receives a request to complete editing. If this is not possible without error, return false.
The following code example shows a possible override of the method. The code invokes the SetColumnValueAtRow method, and then sets a variable that allows other functions to determine whether the column is still in edit more. The code then calls the Invalidate method to redraw the control. Finally, the function returns true to indicate the change has been committed.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.