Yii Framework Forum: Gridview Custom Button Label - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Gridview Custom Button Label Rate Topic: -----

#1 User is offline   Gogo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 37
  • Joined: 17-May 12
  • Location:Sofia

Posted 27 February 2014 - 08:14 AM

Hello everyone,

I have cgridview custom button and I want to add in his label some info like this:

'label'=>'Name - $data->id',


Obviously this won't work.
But I don't know how to escape $data. I tried different ways but none of them do the trick.
Do you know how to do it?
0

#2 User is online   chandran 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 495
  • Joined: 08-October 12
  • Location:Austria

Posted 27 February 2014 - 09:56 AM

Hi,
Label attribute is not php code evaluation component. You must create your custom lable for doing this :)
Thanks
chandran nepolean

My own extension:
http://www.yiiframew...sion/ejqueryte/

My wiki
http://www.yiiframew...checkboxcolumn/

If it work dont hesitate to click +1 button
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users