RefreshData;
The RefreshData method updates data of workbooks registered in the context.
If the workbooks contained unsaved data, the data would be lost.
Executing the example requires a form with the Button1 button, the two LanerBox components and the two UiErAnalyzer components with the UiErAnalyzer1 and the UiErAnalyzer2 identifiers, that are the data sources for the LanerBox components. Workbooks of the time series database must be loaded to the UiErAnalyzer components. It is also supposed that the workbooks are stored in the same context with the pContext identifier.
Add a link to the Ui system assembly. Click the button to start executing this example.
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 this example the data of the workbooks registered in the context is updated.
See also: