Hello to all.
I have one problem with Yii and I’m hoping that someone can help me.
I created CGridView with CArrayDataProvider and search option for table. Table renders just fine, the problem is that search columns with AJAX enabled doesn’t work. I managed to find the problem but dont know how to fix it without breaking something in Yii. My URL query is unusable because jquery.yiigridview.js removes Form input name and input value from URL after using Jquery param.querystring().
HTML code
<tr class="filters">
<td><input name="BackendBodoviForm[ime]" type="text" value="Denis"></td>
<td><input name="BackendBodoviForm[prezime]" type="text"></td>
<td><input name="BackendBodoviForm[1]" type="text" value=""></td>
<td><input name="BackendBodoviForm[2]" type="text" value=""></td>
</tr>
Query URL after search input
/backend/bodovi/turnir/4/?BackendBodoviForm%5B%5D=&BackendBodoviForm%5B%5D=&BackendBodoviForm%5B%5D=&BackendBodoviForm%5B%5D=&ajax=bodovi-grid&id_page=1
As you can see URL doesn’t contain any Form names or search input. It’s removed from URL after
options.url = $.param.querystring(options.url, settings.ajaxVar+"="+id);
is executed in jquery.yiigridview.js.
One solution is to change jquery.yiigridview.js but i don’t want to do that, because it can break other ajax calls.
Only CGridView with CArrayDataProvider doesn’t work. If I use CActiveDataProvider with CGridView filter everything is working fine.
Any help is appreciated.