Keys are provided by the key field of the store that underlies the dataSource. Alternatively, you can set the UI component's keyExpr property. With hierarchical data, keys can be generated automatically if key and keyExpr are not set.
The level of the root node is -1. This node is not visualized and is used to access the full hierarchy of nodes. The root node's children have level 0, the children's children have level 1, and so forth.