Email Is Not Hyperlinked In The Grid

I have the below code in the CGridView



                        'header'=>'Email 1(Pro)',                                               

                        'value'=>'CHtml::link(CHtml::encode($data->emailProfessional), "mailto:".$data->emailProfessional)',

The output shows as below,

<a href=""></a>

instead of hyperlinked with mailto:

I … don’t quite get how that’s wrong? :huh: Also: There’s an [font=“Courier New”]email[/font] type for CGridView and CDetailView. Spares you from assembling the link yourself.

In answer to your specific issue, you need to set the type attribute to either raw or html:



    'header'=>'Email 1(Pro)',




You should follow Da:Sourcerer’s suggestion though.

Ah, so that’s been the displayed (encoded) output and not the raw code ::)

@ Keith, thanks , you’re correct. it worked fine.