This was one of the few things in my project driving me nuts. Thanks for the excellent tip! I tried it at first and it didn’t work but realized the attribute was case sensitive. First case lower when it was being called.
If there are number of other columns and sometime we need to change the order of the concatenated columns i.e DadMom or DadLastName etc, in that case we’ll be creating new functions for each? Any other solution than this?
public function getDadMom()
{
return $this->dad.' '.$this->mom;
}
Now we can use “DadMom” attribute in CHtml::listData()