Re: Re: Datagrid and sorting/paging II
| From: | Olivier Guilyardi | Date: | Sat, 07 Jun 2008 22:01:02 +0000 |
| Subject: | Re: Re: Datagrid and sorting/paging II | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-28987@lists.php.net to get a copy of this message | ||
Hi Bernhard & Mark,
Bernhard Harb a écrit :
But believe me, I have been behind the docs so many hours - I can't count anymore. But unfortunately I didn't find a system behind those docs yet :) Btw., currently I am searching for a solution on how to change column attributes after mdb2 bind. Do you know a nice example somewhere? Quite new to DataGrid.After: $usergrid = $datagrid->bind('SELECT iduser, username, email FROM user', $params, 'MDB2'); You can: $attributes = array('username' => array('class' -> 'someCssClass, ..), ..); $usergrid->setRendererOption('columnAttributes', $attributes) Or: $column = $usergrid->getColumnByField('username'); $column->setAttributes(array('class' -> 'someCssClass', ...);
Then you might like: $usergrid->fill($smarty); See: http://pear.php.net/manual/en/package.structures.structures-datagrid.structures-datagrid-renderer.smarty.php Regards, -- OlivierI use getOutput() because I write the Output to a Smarty-Template.