ITabCellContentChangeBaseEventArgs.Cancel

Syntax

Cancel: Boolean;

Description

The Cancel property determines whether changing the cell contents is to be canceled.

Comments

If the property is set to True, changing the cell contents is canceled.

By default the property is set to False.

Example

Executing the example requires a form, the LanerBox component named LanerBox1 and located on this form and the UiErAnalyzer component used as the data source for LanerBox1. The UiErAnalyzer is connected to one of the workbooks of time series database.

The procedure handles the OnChangeCellContent event of the LanerBox1 component.

    Sub LanerBox1OnChangeCellContent(Sender: Object; Args: ITabCellContentChangeBaseEventArgs);
    Begin
        If Args.Type = TabCellContentChange.Value Then
            If Args.Value > 1000 Then
                Args.Cancel := True;
            End If;
        End If;
    End Sub LanerBox1OnChangeCellContent;

On executing the event changes in table cell are checked. If the cell value changes and the new value is greater than 1000, setting the new value is canceled.

See also:

ITabCellContentChangeBaseEventArgs