treegrid with nested Sets

Hi,

i have a page aip2.creuter.lu/themes/index.php where i have a nested tree structure.
I want to do the same with DHTMLx Treegrid, but it doesn’t work as it should (see aip2.creuter.lu/themes/index2.php).
What did i wrong? Here is the code of my connector.php:

$res=mysql_connect($dbhost,$dbuname,$dbpass);
mysql_select_db($dbname);

require("/dhtmlxConnector_PHP/codebase/treegridgroup_connector.php");
$grid = new TreeGridGroupConnector($res);

function formatting($row){
	$sqsd = "select * from xxxx WHERE id = ".$row->get_value("parent_id");
	$resultsd = mysql_query($sqsd);
	$row->set_value("parent_id",mysql_result($resultsd,0,"title"));        $row->set_value("titre2","^".$row->get_value("title")."^".$row->get_value("fichier")."^_blank");
	$size = $row->get_value("size")/1024; $einheit = "KB";
	if ($size > 1000) {$size = $size/1024; $einheit = "MB";}
	$size = number_format($size,2,","," ");
	$row->set_value("size",$size.$einheit);
}

$grid->event->attach("beforeRender","formatting");

$grid->render_sql("SELECT *,1 as titre2 FROM xxx ORDER BY parent_id,title ASC","id","parent_id,titre2,title,description,datum,size","","parent_id");

Couldn’t you clarify what exactly is wrong with the dhtmlx sample.