Dynamic CHTML::link in CGridView

I have created a CGridView but some of the values are complex and need to call a method in the model. The method could return an image or possibly a CHTML::link() but CGridview will just print the encoded HTML rather than allow the raw HTML to populate the field.

An example of what I have is:




array('name'=>'Connect Status', 'value'=>'Job::retrieveConnectStatus($data)'),



How can I force the output to be left as raw html rather than encoded?

Pardon me.

You can set the type to raw to do exactly what I needed.

Resolved.




 array('name'=>'Connect Status', 'type'=>'raw', 'value'=>'Job::retrieveConnectStatus($data)'),



try :




array('name'=>'Connect Status',type='raw', 'value'=>'Job::retrieveConnectStatus($data)'),



you’d better read the doc : CDataColumn:type

or read this wiki : renderComplexDataCell

Thanks,

I have resolved it but I will read both of those articles.