MetabaseTreeList.SelectionChanged

Syntax

SelectionChanged: function (sender, args)

Parameters

sender. Event source.

args. Event information.

Description

The SelectionChanged event occurs after change of selection in the tree of repository objects.

Example

To execute the example, the HTML page must contain MetabaseTreeList component named list1 (see Example of Creating the MetabaseTreeList Component). Add a handler of the SelectionChanged event:

        list1.SelectionChanged.add(function (sender, args) {
            list1.setMultiSelect(False);
            if (list1.getSelectedObjects()[0].getIsOpened() == True) {
                console.log("Object is opened")
            }
            else console.log("Object is closed")
        })

After executing the example on changing selection in the tree multiple selection is disabled. On selecting an element, the browser console displays the message "Object is opened" if the IsOpened property of the selected object is set to True. Otherwise the following message is displayed: Object is closed.

See also:

MetabaseTreeList