ILanerContext.RefreshData

Syntax

RefreshData;

Description

The RefreshData method updates data of workbooks registered in the context.

Comments

If the workbooks contained unsaved data, the data would be lost.

Example

Executing the example requires a form with the following components: the Button component named Button1, the LanerBox components named LanerBox1 and LanerBox2, and the UiErAnalyzer components named UiErAnalyzer1 and UiErAnalyzer2. UiErAnalyzer1 and UiErAnalyzer2 are data sources for LanerBox1 and LanerBox2. Workbooks of the time series database should be loaded to the UiErAnalyzer components.

It is also supposed that the workbooks are stored in the same context with the pContext identifier.

The example is a handler of the OnClick event for the Button1 component.

Add links to the Express, ExtCtrls, Forms, Laner, Tab, and Ui system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Laner: ILaner;
    UnSvData1, UnSvData2, Refr: Boolean;
Begin
    Laner := UiErAnalyzer2.ErAnalyzer.Laner;
    UnSvData1 := Laner.Series.HaveUnsavedData;
    Laner := UiErAnalyzer1.ErAnalyzer.Laner;
    UnSvData2 := Laner.Series.HaveUnsavedData;
    Refr := True;
    If UnSvData1 Or UnSvData2 Then
        Refr := WinApplication.ConfirmationBox("Proceeding with this operation " +
                "results in unsaved data loss. Proceed?");
    End If;
    If Refr Then
        pContext.RefreshData;
    End If;
End Sub Button1OnClick;

After executing the example the data of the workbooks registered in the context is updated.

See also:

ILanerContext