Check documentation for the latest version of dhtmlxSuite Tree(TreeGrid)GroupConnector DHTMLX Docs


The default connector for Tree and TreeGrid expects that data in DB is stored with child-parent key relation. But in some cases, Tree or TreeGrid need to be shown from plain data (by grouping it). Such a task can be resolved with help of the TreeGroupConnector or TreeGridGroupConnector.

For example, a table 'products' is grouped by category. As a result, the top level is 'categories', the second level - 'products', related to the category.

$tree = new TreeGroupConnector($res);
$tree->render_table("products2", "id", "product_name", "", "category");
<code php>
$treegrid = new TreeGridGroupConnector($res,"MySQL");


Back to top