ITabCellBeforeChangeBaseEventArgs.Value

Fore Syntax

Value: Variant;

Fore.NET Syntax

Value: Variant;

Description

The Value property determines the value contained in the cell after the editing is finished.

Comments

Using this property you can change cell value before editing is completed.

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.

This procedure handles the OnBeforeCellChange event of the LanerBox1 component.

    Sub LanerBox1OnBeforeCellChange(Sender: Object; Args: ITabCellBeforeChangeBaseEventArgs);
    Var
        New_val, Old_val: Variant;
    Begin
        Old_val := Args.TabSheet.CellValue(Args.Row, Args.Column);
        New_val := Args.Value;
    End Sub LanerBox1OnBeforeCellChange;

After executing this event the Old_val contains previous cell value, and the variable New_val contains the value that will be saved to the cell after editing is completed.

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.

This procedure handles the OnBeforeCellChange event of the LanerBoxNet1 component.

    Private Sub lanerBoxNet1_OnBeforeCellChange(Sender: System.Object; Args: Prognoz.Platform.Interop.Tab.TabCellBeforeChangeBaseEventArgs);
    Var
        New_val, Old_val: object;
    Begin
        Old_val := Args.TabSheet.CellValue[Args.Row, Args.Column];
        New_val := Args.Value;
    End Sub;

After executing this event the Old_val contains previous cell value, and the variable New_val contains the value that will be saved to the cell after editing is completed.

See also:

ITabCellBeforeChangeBaseEventArgs