Re: [suspicious - maybe spam] [PEAR] [suspicious - maybe spam] DataGrid can not display added column
| From: | Justin Patrin | Date: | Thu, 05 May 2005 06:17:09 +0000 |
| Subject: | Re: [suspicious - maybe spam] [PEAR] [suspicious - maybe spam] DataGrid can not display added column | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19076@lists.php.net to get a copy of this message | ||
On 5/4/05, digit Shine <digit_shine@yahoo.com.cn> wrote:
>
> hi,
> I use DataGrid to display DataObject.
> Using formBuilder_intergation is ok, but addColumn
> display nothing.
>
>
> dataGrid script:
>
> require_once 'Hr_employee.php';
> $eb = new Hr_employee;
>
> require_once 'Structures/DataGrid.php';
> $dg =& new Structures_DataGrid(10);
>
> $dg->bind($eb,array('formbuilder_integration' => true
> ,'generate_columns' => true
> ));
>
> $linkTitle = 'edit';
> $column = new Structures_DataGrid_Column('edit');
> $column->formatter = 'printLink($linkTitle=' .
> $linkTitle . ')';
> $dg->addColumn($column);
>
> $dg->render();
>
You can't use generate_columns and addColumn at the same time. Remove
generate_columns and use addColumn for all of the columns.
--
Justin Patrin