Yii Framework Forum: Cgridview's Dropdownlist Column Lost Event Binding After Page Change - Yii Framework Forum

Jump to content

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

Cgridview's Dropdownlist Column Lost Event Binding After Page Change Rate Topic: -----

#1 User is offline   CullenSUN 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 08-August 12

Posted 22 October 2012 - 12:13 AM

HI,

I created a dropdownlist column for Cgridview. also binded some event as following

Yii::app()->clientScript->registerScript('search',
" 
$('.status_select').change(function() {

			alert($(this).attr('id'));
});

");


The problem is the event only triggers on the first page of the gridview...

Please help. thanks
0

#2 User is offline   bennouna 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,168
  • Joined: 05-January 12
  • Location:Morocco

Posted 22 October 2012 - 01:49 AM

You must register your js code again in your grid's afterAjaxUpdate property.

http://www.yiiframew...axUpdate-detail
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