trigger cgridview filter remotely

Hi ladies and gents,

I’ve partially rendered my _form.php file right above my cgridview in my admin.php The idea is to be able to create new model while viewing all results below (kinda handy). What I would like to achieve is for my Users model when I am on my admin page…when I fill in the first name input in the _form.php form and when I move the cursor to the second name input I would like this to trigger a filter in my cgridview below w/o touching the search fields of the cgridview. (hope my thought is clear)

I know how to copy(jquery) whats entered in the firstName(_form.php) and paste it to firstName(cgridview filter field) but I cannot trigger the filtering itself. I would appreciate if someone can throw ideas on how I can trigger the filter search of the cgridview after the a field of the (_form.php) has been filled or on blur or whatever?



Check the class of your grid and data table then do some thing like this

$(".grid-vew table.items tr.filters input[name='ModelName[fieldName]']").trigger('change');

thanks Sadaf,

that did the trick