How To Pass Params To Url In Tbeditablecolum

$this->widget(‘bootstrap.widgets.TbExtendedGridView’, array(

array(

‘name’ => ‘status’,

‘class’ => ‘bootstrap.widgets.TbEditableColumn’,

‘headerHtmlOptions’ => array(‘style’ => ‘’),

‘editable’ => array(

‘type’ => ‘select’,

‘url’=>$this->createUrl(’/user/manage’),

‘source’=>array(0=>‘pending’,1=>‘confirmed’,2=>‘banned’),

‘success’=>'js:function(response,newValue){

alert(response);

}’,

)

),

array(

‘name’=>‘warned’,

‘header’=>‘WARNED’,

‘class’=>‘bootstrap.widgets.TbToggleColumn’,

‘toggleAction’=>$this->createUrl(‘user/manage’),

),

);

4527

QQ图片20130715070053.jpg

i don’t know how to handle it

i just wannt to reach like this

‘url’=>$this->createUrl(’/user/manage’,array(‘id’=>$data->id)),

but $data is not defined here.

i am confused about this ,i do not know how to use $data

Try something like this




'url' =>'$this->createUrl("/user/manage",array("id"=>$data->id))',



i tried ;code like this

4530

view&controller.jpg

and result like this:

4531

result.jpg

sorry,could you give me anather help?

Please help - I have the same problem here - it will not recognise


$data->local_policy_id

but other columns in the grid use this successfully. This is not very well documented on any of the websites for TbEditableColumn :(


$this->widget('bootstrap.widgets.TbExtendedGridView',

        array( 'template' => "{items}", 

               'columns' => array(

                  array(

                    'name' => 'local_policy_id' ,

                    'header' => 'ID' ,

                    'type' => 'raw' ,

                    'sortable' => false ,

                    'value' => '$data->local_policy_id'

                  ) , 

                  array(     

                     'id' => 'billing_level' ,     

                     'name' => 'billing_level' ,     

                     'header' => 'Billing Desc' ,     

                     'class' => 'bootstrap.widgets.TbEditableColumn' ,        

                        'editable' => array(             

                             'url' => $this->createUrl("localPolicy/inlineEditable", 

                                   array( "name" => "billing_level" 

                                    , "model" => "UwLocalPolicy"

                                    , "pk" => $data->local_policy_id ))  

                  )

         ) ,



The first column [local_policy_id] shows the ID but I cannot get the second column to bind this number to the URL for the editable action. It is so frustrating as it is the key element setting the PK.

Any help gratefully received,

Peter - Annoyed of Liverpool