venu85
(Venu Narukulla)
March 28, 2013, 6:49pm
1
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.
Open Grid page
Filter a Column
Click on the Page control to Navigate.
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?
I haven’t run into this issue. Can you post your relevant view/controller/model code?
trqson
(Trqson)
May 15, 2013, 1:44am
3
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:
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,
Using a [size=2]browser inspector, what URL is the grid sending its update to a[/size][size=2]fter setting the filter and paging to a new page? Any 404s?[/size]
trqson
(Trqson)
May 16, 2013, 6:12am
5
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