MetabaseTreeList.getShowRootFolder

Syntax

getShowRootFolder()

Description

The getShowRootFolder method indicates if the root folder is displayed.

Comments

This method returns True if the root folder is displayed (default), otherwise it returns False. Root directory displaying can be set in the _ShowRootFolder field.

Use the MetabaseTreeList.RootKey property to indicate, which folder is the root folder.

Example

To execute the example, the HTML page must contain MetabaseTreeList component named list1 (see Example of Creating the MetabaseTreeList Component). Add the checkbox selecting which shows root folder in the tree, and deselecting which hides the root folder:

        var checkBox = new PP.Ui.CheckBox(
        {
           ParentNode: document.getElementById("div1"),
           Content: "Show root directory"
        })
         checkBox.CheckedChanged.add(function (sender, args)
        {
           if (list1.getShowRootFolder() == False)
           {
              list1._ShowRootFolder = True;
              list1.refreshAll()
           }
           else
           {
              list1._ShowRootFolder = False;
              list1.refreshAll()
           }
        })

After executing the example the Show Root Folder checkbox is placed on the page. Checking this box shows the root folder:

On deselecting the checkbox the root folder is not displayed:

See also:

MetabaseTreeList