When overridden in a derived class, initiates a request to interrrupt an edit procedure.
[Visual Basic] MustOverride Public Sub Abort( _ ByVal rowNum As Integer _ ) [C#] public abstract void Abort( int rowNum ); [C++] public: virtual void Abort( int rowNum ) = 0; [JScript] public abstract function Abort( rowNum : int );
The DataGridColumn must end any editing operations before returning. Use the Abort method to accomplish this.
The DataGrid control's EndEdit method indirectly invokes Abort if its ShouldAbort
parameter is set to true.
The following example shows a possible override of the Abort method. The code resets a control's value to a previously cached value, then sets a property of the control that signals that the edit operation is complete. Finally, the code invokes the Invalidate method.
[Visual Basic]
Overrides Sub OnAbort(ByVal rowNum As Long) ' myControl is a placeholder for a control hosted by the DataGridColumn. ' For an example of a column that hosts a control, examine the ' DataGridTextBox class. myControl.Text = oldValue myControl.IsInEditOrNavigationMode = True DataGrid1.GridColumns(DataGrid1.CurrentCell.ColumnNumber).Invalidate End Sub
DataGridColumn Class | DataGridColumn Members | System.WinForms Namespace | EndEdit | Invalidate | Commit