Dynamical Loading mode allows to load data not all at once, but partially, by client side request ( which decrease initial loading time and decrease loading of server )
$conn->dynamic_loading([$rowsNum]);
The parameter(s) are:
To work correctly, related mode need to be enabled on client side as well ( for grid - smart rendring | paging enabled, for tree|treegrid - dynamical loading enabled, for combo - autocomplete enabled )
Normally connector make all operations automatically, and need not customization. But in case of dyn. loading in Tree || TreeGrid it possible that DB already have field which shows is current item leaf or branch. By using beforeRender event it possible to mark item as leaf and through that decrease count of SQL queries generated by component ( which means increase in performance )
function custom_define($item){ if ($item->get_value("is_a_branch")) $item->set_kids(true); else $item->set_kids(false); } $tree->event->attach("beforeRender","custom_define");
The same approach can be used for non-dynamical mode of Tree|TreeGrid as well. It not so necessary , but will increase data generation performance as well. Package contains two samples of basic tree loading, one of which use forced kids flag setting and second not