for example i have two tables A and B each have increment id, but not overlap each other,
Table A have id between 1 to 1000 And B have id between 1001 to 2000.
and also i have table three c. here i stored the id of A and B in one field , that is categorized by some status value, for example if status field is 1 mean the value is from table A, if value is 2 mean the value is from B.
i able to show the Grid view for table c, and value form A and B.
//i am using admin file for view the GridView
here is the code:
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'model-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
//'id',
array(
'name'=>'user_id',
'value'=>'$data->category == (1) ?
Table1::getType($data->user_id):Table2::getType($data->user_id))',
),
array(
'class'=>'CButtonColumn',
),
)); ?>
I Dont Know to How to Make filter option for this one.
Please share Your Thoughts , Because I am Lost More Time in This