BeginSelectionUpdate;
BeginSelectionUpdate();
The BeginSelectionUpdate method deactivates application of a selection in data source while changing of a selection in the table.
After calling the method and before calling the IPivot.EndSelectionUpdate method changing of the selection available in the IPivot.Selection property does not lead to changing of 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 deactivates application of a selection in data source in case of its 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: