hi,
I am totally new to yii Framework, so please accept that I might struggle to explain my problem proper. I have created an ExtendedGridView with a filter function (dropdown) on 1 column. Everything works fine.
I then set the default selected drop-down (current) in my Controller. This will show only the current members and not all available members from the db.
$model=new MembersView('search');
$model->members = 'current';
$model->unsetAttributes(); // clear any default values
if(isset($_GETMembersView))
$model->attributes = $_GET['MembersView']
$this->render('member',array(
'model'=>$model,
));
All that works when I change the drop-down, I see all members when I chose all and only current members when I choose current.
But, I have now noticed that if I do a refresh of the browser, the drop-down shows the default selected again, but the Grid does not get updated. the same happens when I go to another page and come back, the dropdown gets reset on the selected, but the Grid does not get updated.
After reading I though that I have to add the following:
$this->widget('ExtendedGridView', array(
'id'=>'my-grid',
'afterAjaxUpdate' => 'function() { $.fn.yiiGridView.update("my-grid"); }',
But this way it gets constantly updated and the Grid is not usable anymore. So I must clearly misunderstand the instruction. Could someone assist? Thank you very much in advance.