MindFusion.Wpf Pack Programmer's Guide
Workbook.CancelChangeOperation Method
See Also
 





Stops tracking changes by the specified command and reverts all changes done so far.

Namespace: MindFusion.Spreadsheet.Wpf
Assembly: MindFusion.Spreadsheet.Wpf

 Syntax

C#  Copy Code

public void CancelChangeOperation (
    TrackChangesCommand command
)

Visual Basic  Copy Code

Public Sub CancelChangeOperation( _
    command As TrackChangesCommand _
)

 Parameters

command

The command to cancel.

 Remarks

The usual scenario for cancelling a command is when an exception happens while the command is active. The code below illustrates this scenario.

C#  Copy Code

var command = workbook.StartChangeOperation(worksheet);
try
{
    // Changes on the worksheet go here
    workbook.CommitChangeOperation(command);
}
catch
{
    workbook.CancelChangeOperation(command);
}

Visual Basic  Copy Code

Dim command = workbook.StartChangeOperation(worksheet)
Try

    ' Changes on the worksheet go here
    workbook.CommitChangeOperation(command)

Catch

    workbook.CancelChangeOperation(command)

End Try

Alternatively, the command can be cancelled by calling its Cancel method.

 See Also

Workbook Members
Workbook Class
MindFusion.Spreadsheet.Wpf Namespace