BeginSelectionUpdate;
BeginSelectionUpdate();
The BeginSelectionUpdate method disables selection in data source on changing selection in the table.
After calling the method and before calling the IPivot.EndSelectionUpdate method changing selection available in the IPivot.Selection property does not lead to changing selection in the data source.
Executing the example requires a form containing the following components:
Button with the Button1 identifier.
TabSheetBox with the TabSheetBox1 identifier.
UiErAnalyzer with the UiErAnalyzer1 identifier that is a data source for TabSheetBox1.
Add links to the Dimensions, Pivot system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
OLAP: IEaxAnalyzer;
Pivot: IPivot;
DimSS: IDimSelectionSet;
Begin
OLAP := UiErAnalyzer1.ErAnalyzer;
Pivot := OLAP.Pivot;
DimSS := Pivot.Selection;
Pivot.BeginSelectionUpdate;
//...
//Change selection
//...
Pivot.EndSelectionUpdate;
//Repeated getting of selection with rebuilt controlled dimensions
DimSS := Pivot.Selection;
Pivot.BeginSelectionUpdate;
//...
//Change selection in dimensions controlled by other dimensions
//...
Pivot.EndSelectionUpdate;
End Sub Button1OnClick;
Clicking the button disables selection in data source on selection changing in the table to accelerate working process.
The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Pivot;
…
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
OLAP: IEaxAnalyzer;
Pivot: IPivot;
DimSS: IDimSelectionSet;
Begin
OLAP := UiErAnalyzerNet1.ErAnalyzer.ErAnalyzer;
Pivot := OLAP.Pivot;
DimSS := Pivot.Selection;
Pivot.BeginSelectionUpdate();
//...
//Change selection
//...
Pivot.EndSelectionUpdate();
//Repeated getting of selection with rebuilt controlled dimensions
DimSS := Pivot.Selection;
Pivot.BeginSelectionUpdate();
//...
//Change selection in dimensions controlled by other dimensions
//...
Pivot.EndSelectionUpdate();
End Sub;
See also: