NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataGridColumn.Abort

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
);

Parameters

rowNum
The row number upon which an operation is being interrupted.

Remarks

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.

Example [Visual Basic]

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

See Also

DataGridColumn Class | DataGridColumn Members | System.WinForms Namespace | EndEdit | Invalidate | Commit