PeriodSeriesViewMaster.SelectionChanged

Syntax

SelectionChanged(sender: Object, args: Object);

Parameters

sender. Event source.

args. Event information. Available argument: JSON object with the Source field - wizard data source.

Description

The SelectionChanged event occurs on change of element selection in dimension trees of all attributes of the PeriodSeriesViewMaster wizard.

Example

To execute the example, the HTML page must contain the PeriodSeriesViewMaster component named pswMaster (see Example of creating the PeriodSeriesViewMaster component). Process the SelectionChanged event:

// Process the RequestSelectedItemsChanged event
pswMaster.RequestSelectedItemsChanged.add(function (sender, args) {
    console.log("Number of dimensions selected in the tree: " + args.Ids.length);
});
pswMaster.SelectionChanged.add(function (sender, args) {
    console.log("Element selection is changed in wizard attribute hierarchy");
    // Get the Series panel
    var item = pswMaster.getItems()[0];
    // Get dimensions tree of the Series attribute
    var tree = item.getSeriesTreeView();
    // Fire the RequestSelectedItemsChanged event
    this.RequestSelectedItemsChanged.fire(this, {
        Ids: tree.getSelectedNodes()
    });
});

Next click on any element in dimension tree of any attribute of the considered wizard.

After executing the example, each time such an operation is performed, the browser console displays a message on selection change and the number of dimensions selected in the tree:

Element selection in wizard attribute hierarchy is changed

Number of dimensions selected in the tree: 3

See also:

PeriodSeriesViewMaster