I have a db column named “object” that I would need to read within a beforeRender function to change the icon of a leaf object. I’ve look in the docs but don’t seem to know how to do it. get_value looked like what I needed but that doesn’t seem to work. Any ideas?
<?php
function custom ($row)
{
if ( $row->get_value('object') == 'C' ) $row->set_image('iconCheckGray.gif');
}
@session_start();
require('config_settings.php');
$res = mysql_connect( $MYSQL_HOST, $MYSQL_ID, $MYSQL_PW );
mysql_select_db('deltaflow_sapp');
require("../api/dhtmlxConnector/codebase/tree_connector.php");
$tree = new TreeConnector($res);
$tree->event->attach( "beforeRender", "custom" );
$tree->render_table( "tree", "itemId", "itemDesc", "", "parentId" );
?>