Chtml values

hi all,

can we use 2 models in chtml::listdata().

i have a problem wherein i am showing values in dropdown from one model and i want to display description of those

values which are in other model.i have tried the following


         $codesArray = CHtml::listData(ChargesMaster::model()->findAllBySql($sql),'CodesMaster.cod_accountName','charge_code','charge_code' );



i have established a relationship in model.but it is showing the same value in description also.please help.

Can you share your relationships functions from those two models, i think problem could be in relationships