TreeList.beginUpdate

Syntax

beginUpdate ();

Description

The beginUpdate method disables tree rerendering until the endUpdate method is called.

Example

To execute the example, the page must contain the TreeList component named treeListSett (see an example of the TreeList.NodeUnHovered event). The page must contain DIV elements with the identifiers but1 and but2. Add two buttons:

var but1 = new PP.Ui.Button(
{
    ParentNode: document.getElementById("but1"),
    Content: "begin update",
    Click: function ()
    {
        treeListSett.beginUpdate();//component is repainted after pressing the button «end update»
        treeListSett.expandAll();//all nodes are expanded
    }
});
var but2 = new PP.Ui.Button(
{
    ParentNode: document.getElementById("but2"),
    Content: "end update",
    Click: function ()
    {
     treeListSett.endUpdate();//component repainting: all nodes are expanded
    }
});

After executing the example no changes occur on clicking the Begin Update button. Clicking the End Update button expands all tree nodes.

See also:

TreeList