Re: Re: Structures_DataGrid_Renderer_Smarty

From: Date: Fri, 20 Oct 2006 15:51:12 +0000
Subject: Re: Re: Structures_DataGrid_Renderer_Smarty
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25574@lists.php.net to get a copy of this message
What you need to do is something like the following: $s = new Smarty(...); $dg =& new Structures_DataGrid(...); $dg->bind(...); $dg->fill($s); $s->display(PATH TO YOUR TEMPLATE);
Ok, I've got it working. Thanks. :)
It gives you the "contents" for the template, i.e. both attributes and contents for the cells. It may sound trivial, but have a look at the code: there are more than a few lines.
I see that when it sets the value for the $recordSet variable, it does so using an associative array using integer values as keys for each column. Is there something I can do so that it instead uses the column name as the key? thnx, Chris

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