Yii Framework Forum: Ajax Update Cgridview On Dropdown Change - Yii Framework Forum

Jump to content

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

Ajax Update Cgridview On Dropdown Change Rate Topic: -----

#1 User is offline   Newbia 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 03-January 14

Posted 13 March 2014 - 01:01 AM

Hello I am newbie in yii i am stuck in update a cgridview on ajax call i have tried lots of solution but not helped

Here is my code

$.ajax({
'type':'POST',
'url':'<?php echo $this->createUrl("bills/index")?>',
data:{org_id:orgs_id},
success:function(data){
//$('#pending').yiiGridView('update');
$.fn.yiiGridView.update('yw5', {
data: $(this).serialize()
});
return false;
},
});
0

#2 User is offline   Newbia 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 03-January 14

Posted 13 March 2014 - 01:12 AM

View PostNewbia, on 13 March 2014 - 01:01 AM, said:

Hello I am newbie in yii i am stuck in update a cgridview on ajax call i have tried lots of solution but not helped

Here is my code

$.ajax({
'type':'POST',
'url':'<?php echo $this->createUrl("bills/index")?>',
data:{org_id:orgs_id},
success:function(data){
//$('#pending').yiiGridView('update');
$.fn.yiiGridView.update('yw5', {
data: $(this).serialize()
});
return false;
},
});





Got Solution finally


this is code

$("#organisations").change(function(){
var orgs_id = $("#organisations").val();
$.fn.yiiGridView.update('yw5', {
type:'POST',
url:'<?php echo $this->createUrl("bills/index")?>',
data:{org_id:orgs_id},
});
return false;
});
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