Yii Framework Forum: Registerscript For Two Different Scripts For A Grid Editable - Yii Framework Forum

Jump to content

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

Registerscript For Two Different Scripts For A Grid Editable Rate Topic: -----

#1 User is offline   yamildeveloper 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 06-March 12

Posted 17 March 2013 - 07:25 PM

I'm trying to implement a grid editable. I'm using this code that is working for one column but not with two columns.

For the event, I use this script with the function registerscript:

Yii::app()->clientScript->registerScript('status','

	$("a[class^=editable-]").editable("'.$this->createUrl('user/status').'", {
		submitdata : function (value,settings){
						return {"User[id]":$(this).attr("class").substr("9"),};
					},t
        indicator : "Saving...",
        tooltip   : "Click to edit...",
        type : "select",
        data   : "{\'1\':\'Active\',\'0\':\'Inactive\'}",
        submit   : "OK",
        name : "User[status]"
     });

',CClientScript::POS_READY);


I create other script for the other column but only recognize one of the scripts.

Yii::app()->clientScript->registerScript('status2',' .... 


How can I use two scripts one for each column?
0

#2 User is offline   yamildeveloper 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 06-March 12

Posted 17 March 2013 - 07:27 PM

the url with the complete example is this:
help.discretelogix.com/php/yii/enable-in-place-editing-in-yii-grid.htm
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