[suspicious - maybe spam] [suspicious - maybe spam] DataGrid can not display added column

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[suspicious - maybe spam] [suspicious - maybe spam] DataGrid can not display added column

digit Shine

hi,
I use DataGrid to display DataObject.
Using formBuilder_intergation is ok, but addColumn
display nothing.

Hr_employee.php:
...
    var $fb_fieldsToRender=array(
    'name',
    'position_id',
    'section_id',
    'grade_id',
    'status_id'
    //,'edit' //***
    );
...    

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();

result:(content in chinese)
name   position_id   section_id   grade_id   status_id
Tom accountant account house manager in-service
???? ??? ?????? ???? ???
???? ---- ---- ---- ???
????? ---- ---- ??? ???
????? ??? ???? ??? ???
?????? ????? ????? ??? ???
???? ???? ???? ??? ???
???? ??????? ????? ???? ???
??? ???? ???? ???? ???

Column 'edit' not displayin the table above.
Why??

bitShine

_________________________________________________________
Do You Yahoo!?
150????MP3???????????????????
http://music.yisou.com/
?????????????????????????????
http://image.yisou.com
1G????1000??????????????)???
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/

--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply | Threaded
Open this post in threaded view
|

Re: [suspicious - maybe spam] [PEAR] [suspicious - maybe spam] DataGrid can not display added column

Justin Patrin
On 5/4/05, digit Shine <[hidden email]> 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

--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php