TreeStore. A TreeGridCellRenderer can be assigned to the ColumnConfig in which the tree will be displayed. With state enabled, TreePanel will save and restore the expand state of the nodes in the tree. A ModelKeyProvider must specified with the TreeStore this tree is bound to. Save and restore works with both local, and asynchronous loading of children.
@param < M> the model type
A TreeGrid works just like a {@link com.smartgwt.client.widgets.grid.ListGrid}, except one column (specified by {@link com.smartgwt.client.widgets.tree.TreeGridField#getTreeField treeField} shows a hierarchical {@link com.smartgwt.client.widgets.tree.Tree}. A TreeGrid is not limited to displaying just the {@link com.smartgwt.client.widgets.tree.Tree} column - you can define additional columns (via {@link com.smartgwt.client.widgets.tree.TreeGrid#getFields fields}) which will render just like the columns of a {@link com.smartgwt.client.widgets.grid.ListGrid}, and support all of the functionality of ListGrid columns, such as {@link com.smartgwt.client.widgets.grid.ListGridField#formatCellValue formatters}.
Except where explicitly overridden, {@link com.smartgwt.client.widgets.grid.ListGrid} methods, callbacks, and properties apply to TreeGrids as well. The{@link com.smartgwt.client.widgets.grid.ListGrid} defines some methods as taking/returning {@link com.smartgwt.client.widgets.grid.ListGridField} and {@link com.smartgwt.client.widgets.grid.ListGridRecord}. When using those methods in a TreeGrid, those types will be {@link com.smartgwt.client.widgets.tree.TreeGridField} and {@link com.smartgwt.client.widgets.tree.TreeNode}, respectively.
| |