CGridView data column value


I need to put a link in the CGridView.

I am not putting the link in a CLinkColumn as the link needs to call a javascript function and the "linkHtmlOptions" property of the CLinkColumn does not appear to be working for me.


	"header" => "Options",

	"type" => "raw",

	'value' => '<a href="#">link</a>'


This does not work either.

Basically my requirement is to put a link with a call to a javascript function in the CGridView can this be done?

Maybe this wiki article helps.

yes absolutely , try this:


                                                         "header" => "Options",

                                                         "type" => "raw",

                                                         'value' => 'CHtml::link("link","#",array("onclick"=>"alert()"))',


be careful to the double quotes :lol:

that should work

ya it will work