mmbalaa
(Mmbalasundaram)
1
I used two gridview in my view page for two different status. It is working fine on page load. My page load format is
Gridview1
<gridview1>
Gridview2
<gridview2>
But, When i use form search or pagination, My format change
Gridview1
<gridview1>
<gridview2>
Gridview2
<gridview2>
Here gridview 1 and 2 load again. Its ok but page load gridview2 still there.
Note: I used different id for gridview and both gridview display same table but different model, different data like status
share your code or share your problem in screen shots so we can understand better
mmbalaa
(Mmbalasundaram)
3
incontroller admin action
public function actionAdmin()
{
$category='';
$model=new Subcategorymaster('search');
$model1=new Subcategorymaster('search');
$model->unsetAttributes(); // clear any default values
if(isset($_GET['Subcategorymaster']))
$model->attributes=$_GET['Subcategorymaster'];
$this->render('admin',array(
'model'=>$model,'model1'=>$model1
));
}
in view admin.php
-------------------
<?php $this->renderPartial('_search',array( 'model'=>$model,)); ?>
</div>
//gridview 1
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'subcategorymaster-grid',
'dataProvider'=>$model->searchactive(),
//'filter'=>$model,
'columns'=>array(
.............
)
));
//gridview 2
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'subcategorymaster-grid',
'dataProvider'=>$model->searchinactive(),
//'filter'=>$model,
'columns'=>array(
.............
)
));
http://www.yiiframework.com/forum/index.php?app=core&module=attach§ion=attach&attach_rel_module=post&attach_id=3587
mmbalaa
(Mmbalasundaram)
4
Sorry guys. By mistake i put same id again. Working fine now.