Re: Datagrid - addcolumn()
| From: | Mark Wiesemann | Date: | Tue, 23 May 2006 09:45:57 +0000 |
| Subject: | Re: Datagrid - addcolumn() | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24119@lists.php.net to get a copy of this message | ||
Toppi wrote:
> i achieved adding a custom column via:
>
> $column = new Structures_DataGrid_Column('Details', 'details',
> 'details', array('align' => 'center'), '<a
> href="'.$hmm_current_column_id_value.'">Klick</a>', null);
> $datagrid->addColumn($column);
>
> but i dont really understand how i may access values from the "real"
> columns from the sql table...
>
> i need "current-row-value" from sql-table (column "id").
You need to use a 'formatter'. Please refer to this example:
http://pear.php.net/manual/en/package.structures.structures-datagrid.example-advanced.php
In the formatter function you can do a print_r($params) to get an idea
of what $params contains. Of course, the value you need, is in there.
> is there any (extensive) tutorial on datagrid? :)
Currently - unfortunately - not. We will work on that once the new
release is out.
Regards,
Mark