Grid View Trigger Filtering


I would like to trigger a grid view filter based on a javascript event.

The triggering will need to send all data that is currently in the filters.

Any help would be appreciated.


First create your filter form by by using CActiveForm widget for some model class

to populate grid, then fire j script like below:

jQuery('#some-form-name').on('submit', function(){

  var _data = jQuery(this).serialize();

  $.fn.yiiGridView.update("your-ajax-grid-id", {url:"/some-url-to-post-or-leave-blank-to-use-same", data : _data});

  return false;


Find more here: