Notes to Inheritors:
The Commit 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 Commit method when the DataGridColumnStyle receives a request to complete editing. If this is not possible without error, return false.
The Commit method is called by the public method OnMouseDown of the System.Windows.Forms.DataGrid control. The method is also called by other private methods, for example, when the current row is changed.
The following code example shows a possible override of the Commit 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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.