This applies for CGridView, TbGridView on Safari, Chrome and Mozilla browsers. No idea about other browsers
I am able to display the results in grid view, filter is working fine and page control is working fine but in the below scenario , I am not able unselect the selected filter value.
1. Open Grid page
2. Filter a Column
3. Click on the Page control to Navigate.
4. Change filter (This step is not working) - Filter value is not changing until I refresh the page(until calling the action again)
Does any one experienced the same issue ? It looks like a bug?
Page 1 of 1
Cgridview Filter Reset Error - After Clicking In Pager
#2
Posted 28 March 2013 - 09:59 PM
I haven't run into this issue. Can you post your relevant view/controller/model code?
#3
Posted 14 May 2013 - 08:44 PM
I also have this problem.
You have to repeat the filter after switching to another page (Gridview Page Navigate).
Detail code for this bug:
Controller:
View:
Thanks,
You have to repeat the filter after switching to another page (Gridview Page Navigate).
Detail code for this bug:
Controller:
public function actionAdmin($case = 'normal')
{
if ($case == 'normal')
{
$model = new MBPGeneral('search');
$model->unsetAttributes();
if (isset($_GET['MBPGeneral']))
$model->attributes = $_GET['MBPGeneral'];
$this->render('admin', array(
'model' => $model,
));
}
}View:
<?php
$this->widget('zii.widgets.grid.CGridView', array(
'id' => 'bp_general_grid',
'dataProvider' => $model->search(),
'filter' => $model,
'columns' => array(
'id',
'name',
),
)); ?>Thanks,
#4
Posted 15 May 2013 - 07:26 AM
Using a browser inspector, what URL is the grid sending its update to after setting the filter and paging to a new page? Any 404s?
#5
Posted 16 May 2013 - 01:12 AM
My results after testing:
1. Search page 1: localhost/ERP/bp/Customer/Admin?MBPGeneral%5Bcode%5D=&MBPGeneral%5BcustomerM%5D=88&MBPGeneral%5Bcontact_person_id%5D=&MBPGeneral%5Bcity%5D=&MBPGeneral%5Bbp_group_id%5D=&MBPGeneral%5Bstatus_id%5D=1&MBPGeneral%5Bpriority_id%5D=&MBPGeneral_page=1&ajax=bp_general_grid 2. No search on page 1: localhost/ERP/bp/Customer/Admin?MBPGeneral%5Bcode%5D=&MBPGeneral%5BcustomerM%5D=&MBPGeneral%5Bcontact_person_id%5D=&MBPGeneral%5Bcity%5D=&MBPGeneral%5Bbp_group_id%5D=&MBPGeneral%5Bstatus_id%5D=1&MBPGeneral%5Bpriority_id%5D=&MBPGeneral_page=1&ajax=bp_general_grid 3. Switch page 2: localhost/ERP/bp/customer/Admin/MBPGeneral%5Bcode%5D//MBPGeneral%5BcustomerM%5D//MBPGeneral%5Bcontact_person_id%5D//MBPGeneral%5Bcity%5D//MBPGeneral%5Bbp_group_id%5D//MBPGeneral%5Bstatus_id%5D/1/MBPGeneral%5Bpriority_id%5D//MBPGeneral_page/2/ajax/bp_general_grid?ajax=bp_general_grid 4. Search on page 2: localhost/ERP/bp/customer/Admin/MBPGeneral%5Bcode%5D//MBPGeneral%5BcustomerM%5D//MBPGeneral%5Bcontact_person_id%5D//MBPGeneral%5Bcity%5D//MBPGeneral%5Bbp_group_id%5D//MBPGeneral%5Bstatus_id%5D/1/MBPGeneral%5Bpriority_id%5D//MBPGeneral_page/2/ajax/bp_general_grid?ajax=bp_general_grid&MBPGeneral%5Bcode%5D=&MBPGeneral%5BcustomerM%5D=88&MBPGeneral%5Bcontact_person_id%5D=&MBPGeneral%5Bcity%5D=&MBPGeneral%5Bbp_group_id%5D=&MBPGeneral%5Bstatus_id%5D=1&MBPGeneral%5Bpriority_id%5D=&MBPGeneral_page=1
Share this topic:
Page 1 of 1

Help













