rootParent

defines the id of the root parent

string rootParent;

Example

var treegrid = new dhx.TreeGrid("treegrid", {
    rootParent: "root",     columns: [
        { width: 340, id: "name", header: [{ text: "Name" }] },
        { width: 340, id: "native", type: "string", header: [{ text: "Native name" }] },
        { width: 260, id: "capital", type: "string", header: [{ text: "Capital" }] },
        { width: 260, id: "currency", type: "string", header: [{ text: "Currency" }] }
    ],
    data: dataset
});

Details

By default, the root parent takes the id of the TreeGrid container. If the id of the container is set to null or defined as an HTML element, the value of the root parent will be auto-generated.

Change log

added in v7.1

Back to top