Re: Structures_Datagrid:: calling toHTML() isnt possible

From: Date: Thu, 11 Nov 2004 17:18:48 +0000
Subject: Re: Structures_Datagrid:: calling toHTML() isnt possible
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15448@lists.php.net to get a copy of this message
Alexander Petri wrote:
why isnt it possible to call $dg->toHTML() ??? // Fatal error: Call to undefined method Structures_DataGrid::toHTML() in .... // but $db->render() is possible? i use the normal HTML Table renderer and put it into smarty... like this: $smarty->assign("tabelle",$dg->render()); $smarty->assign("pager",$dg->renderer->getPaging()); i had to patch the file HTMLTable.php on line ~205 to "return return $this->toHTML($dg);" is there another way without patching the class?
Try this: $smarty->assign('tabelle', $dg->renderer->toHTML($dg)); Right now you have to pass the $dg back into the renderer for toHTML to work. Im in the middle of reworking this so that you don't have to pass the $dg object back into the renderer. As soon as I get my new internet connection (hopefully next week) I will be releasing a new beta version soon with many enhancements. Enjoy Andrew

« previous php.pear.general (#15448) next »