/*** Using cjuidialog to edit rows in a Cgridview http://www.yiiframework.com/wiki/204/using-cjuidialog-to-edit-rows-in -a-cgridview translated by PHP Siege Division Http://blog.csdn.net/phpgcs Scenario Solution Column hyperlink Javascript function * *//*** background Scenario ***/I have here a series of clients/events belong to the Cgridview, on each line (eventclient), I want to achieve fast editing eventclient dialog box. My approach is based on this wiki http://www.yiiframework.com/wiki/145/cjuidialog-for-create-new-model//*** solution solution ***/First based on Wiki 145 After doing all the work, then to modify our Cgridview:column hyperlink for each column, set the _updatecomment_url property to the desired URL in the JS function. Array (' name ' = ' comment ', ' header ' = ' Comments ', ' type ' = ' raw ', ' value ' = ' chtml::link ' ( ($data ["comment"]? $data ["comment"]: "(comment)"), "", Array (\ ' style\ ' =>\ ' Cursor:po Inter Text-decoration:underline;\ ', \ ' onclick\ ' =>\ ' {updatecomment._updatecomment_url= ' \ '. Yii::app ()->createurl ("Eventclient/updatecomment", Array ("id" = $data ["id"])). \ ' "; Updatecomment (); $ ("#dialogComment"). Dialog ("Open");} \ ')), Javascript function on the same page we will invoke the Updatecomment () method of this action included in.
http://www.bkjia.com/PHPjc/477117.html www.bkjia.com true http://www.bkjia.com/PHPjc/477117.html techarticle /*** Using cjuidialog to edit rows in a Cgridview http://www.yiiframework.com/wiki/204/ Using-cjuidialog-to-edit-rows-in-a-cgridview translated by PHP Siege Division http://blog.csdn.net/ ...