Back to the index of articles and examples
This is not a finished example.
The data in this example is mostly random text. The source of data is a function which will fill the visible columns with random pieces of text, except for a few fields which are not displayed and describe the structure of the tree. These fields are:
id
: a unique identifier for each record, in this case a simple autoincrementparent
: the id
this record is a child of, or -1 if nonedepth
: how deep the record is nested in the treeYou can click anywhere on a row to expand/collapse the children. Only those records that have icons have children. The icons are not the best choice, I just grabbed them from elsewhere.