Custom Fields With Connector

Is it possible to use the treeGrid connector custom fields?

I’m can’t figure out to make the connector return a custom field along with other db fields.

$tree->render_sql( “SELECT * FROM orders”, “mainId”, “leaf(), datetime, datetime_s”, ‘’, ‘parentId’ );

function leaf ()
{
if ( $ix == 0 ) {
return $msnum
} else {
$ct = 200;
return “Request #$ct”;
}
}

I’m trying to do something like this:

You can use

$tree->render_sql( "SELECT *, 0 as leaf FROM orders", "mainId", "leaf, datetime, datetime_s", '','parentId' );

And use before_render event to set “leaf” value.
docs.dhtmlx.com/doku.php?id=dhtm … nder_event

How do I access the database data from within the before_render? The get_value seems to pull data from the grid. I need to make decisions based off the row of MySQL data.

Thanks,
John

[code]function leaf_objects($row)
{
global $conn;

    $n = 'mainId';

$x = $row->get_value($n);

if ( $x > 0 ) .......

}
[/code]

OK,I get it now. I was looking at this wrong.

Thank you for your time.

John