ITabCellContentChangeBaseEventArgs.Cancel

Fore Syntax

Cancel: Boolean;

Fore.NET 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.

Fore Example

To execute the example a form, the LanerBox component named LanerBox1 positioned on this form and the UiErAnalyzer component used as the data source for LanerBox1 are required. 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.

Fore.NET Example

To execute the example a form, the LanerBoxNet component named LanerBoxNet1 positioned on this form and the UiErAnalyzerNet component used as the data source for LanerBoxNet1 are required. The UiErAnalyzerNet is connected to one of the workbooks of time series database.

The procedure handles the OnChangeCellContent event of the LanerBoxNet1 component.

    Private Sub lanerBoxNet1_OnChangeCellContent(Sender: System.Object; Args: Prognoz.Platform.Interop.Tab.TabCellContentChangeBaseEventArgs);
    Begin
        If Args.Type = TabCellContentChange.tcccValue Then
            If Convert.ToDouble(Args.Value) > 1000 Then
                Args.Cancel := True;
            End If;
        End If;
    End Sub;

On executing this 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