clevertech/YiiBooster

How to add eye view, Newbie problem

mathewmagante opened this issue · 6 comments

I wan' t to add eye view when i add this code it nothing happen

widget('booster.widgets.TbGridView', array( 'dataProvider'=>$dataProvider, 'columns'=>array( 'UserID', 'UserName', 'SystemID', 'Description', 'LastPasswordChange' ,'DateCreated' ``` ,array( 'htmlOptions' => array('nowrap'=>'nowrap'), 'class'=>'booster.widgets.TbButtonColumn', 'viewButtonUrl'=>'Yii::app()->createUrl(\'userData/view&id=\'. $data->UserID)', 'updateButtonUrl'=>'Yii::app()->createUrl(\'userData/update&id=\'. $data->UserID)', ) ), ``` )); ?>

i want this happen
problem

This is more a question for stack overflow or the yii forum ... but here:

http://www.yiiframework.com/doc/api/1.1/CButtonColumn#template-detail

array(
    'htmlOptions' => array('nowrap'=>'nowrap'),
    'class'=>'booster.widgets.TbButtonColumn',
        'viewButtonUrl'=>'Yii::app()->createUrl(\'userData/view&id=\'. $data->UserID)',
    'updateButtonUrl'=>'Yii::app()->createUrl(\'userData/update&id=\'. $data->UserID)',
'template'=>'{view}{update}'
)

actually stack overflow is not my problem my friend said the default of that button is 3 for view delete and edit,,, i don't know where I can return the 2 button,,

thanks for help I appreciate it

To control the buttons shown on that column you have to change the template property. In your case it should be something like:

            'template' => '{view} {update}',

I have to close this!

after I put the code this will happen, I don't know if something i need to configure to controller or model? T_T

untitled

untitled1

sorry i realize its a stupid question
i resolve this by change this 'class'=>'booster.widgets.TbButtonColumn', to this one
'class'=>'CButtonColumn',

thanks a lot

topic close
+rep