BeginSelectionUpdate;
The BeginSelectionUpdate method disables selection in data source on changing selection in the table.
After calling this method and before calling the IPivot.EndSelectionUpdate method changing of a selection, available in the IPivot.Selection property, will not result in changing of a selection in original data source.
Executing the example requires a form containing the following components:
Button named Button1.
TabSheetBox named TabSheetBox1.
UiErAnalyzer named UiErAnalyzer1 that is a data source for TabSheetBox1.
Add links to the Dimensions, Pivot system assemblies.
The example is a handler of the OnClick event for the Button component.
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.
See also: