Structures DataGrid Smarty Render & Column Width

From: Date: Tue, 25 Jul 2006 14:56:04 +0000
Subject: Structures DataGrid Smarty Render & Column Width
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24755@lists.php.net to get a copy of this message
Hi there, I'm looking for a decent way to define the width of a colum set when rendering the datagrid as a table. If I know in the template in advance how many columns and each desired width, then I can code some logic in the template (although that tends to be a bit messy). However, in my case, the columns are variable, and ideally should be set outside of the design logic. I'd like to do something like this: $datagrid->addColumn( new Structures_DataGrid_Column(
       'ID',
       'id',
       'id',
       array('width' => '5%'),
) ); $datagrid->addColumn( new Structures_DataGrid_Column(
       'Title',
       'title',
       'title',
       array('width' => '50%'),
) ); etc... It it possible to pass column attributes over to the template? If it is, how this is done totally escapes me. Otherwise, does anyone have any suggestions I can accomplish this? Thanks, Michael -- Michael Caplan - Zend Certified PHP Engineer Programming Manager Apison Communications Suite 110, 151 Provost Street New Glasgow, NS, Canada B2H 2P6 Phone: (902) 695-3375 Toll Free: (800) 845-6998 Fax: (902) 695-7777 email: michael@apison.com URL: http://www.apison.com Specializing in web development, graphic design and Internet marketing

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