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
Page 1 of 1
Cgridview Update Problem
#2
Posted 10 December 2012 - 07:29 AM
share your code or share your problem in screen shots so we can understand better
#3
Posted 10 December 2012 - 07:46 AM
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.yiiframew...&attach_id=3587
Attached File(s)
-
problem1.png (56.14K)
Number of downloads: 4 -
problem2.png (50.43K)
Number of downloads: 4
Share this topic:
Page 1 of 1

Help













