Before Render Function (Child Birth Control)

I need to control whether the ‘+’ appears in the treegrid when using multitable. I see in the documentation you recommend using the following:

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");

But where does this function/override go? or put differently, Where should it be placed?

Thanks in advance.

Nevermind. . . .I just dropped it into the php file before the

$treegrid->render_sql

in the case statement & it works. Sorry for the bother! (P.S. It it had been EXT.JS that never would have worked in a million years. Thanks for your excellent software.)