Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Filters Using Relationship Id

$
0
0
I have problem with filters using relationship id like:
in Model
return array(
'mname' => array(self::BELONGS_TO, 'Voilencemethods', 'name'),
);

using in GridView
array(
'name'=>'name',
'value'=>'$data->mname->name',
'filter'=>CHtml::listData(Voilencemethods::model()->findAll(), 'id', 'name'),
),

But when i select a value from dropdown list having id like 1 it also load all the name having id 10, 11, 12 ..., in short all those IDs having 1.
Kindly any solution?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>