Re: Re: Datagrid and sorting/paging II

From: Date: Sat, 07 Jun 2008 22:08:33 +0000
Subject: Re: Re: Datagrid and sorting/paging II
References: 1 2 3 4 5  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-28989@lists.php.net to get a copy of this message
Bernhard Harb a écrit :
Thanks für your reply! Is there a list, which attributes I can apply?
This is HTML attributes.. you can use the ones you like.
Thanks, Bernhard. Olivier Guilyardi schrieb:
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', ...);
I use getOutput() because I write the Output to a Smarty-Template.
Then you might like: $usergrid->fill($smarty); See: http://pear.php.net/manual/en/package.structures.structures-datagrid.structures-datagrid-renderer.smarty.php Regards, -- Olivier


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