How To Pass Variable On Linkhtmloptions


How to pass variable on linkHtmlOptions ?


You can’t, set the correct url to the link itself and use:


Have you tried createUrl?

'linkHtmlOptions'=>array('onclick'=>'' . $this->createUrl('/CRM/default/activityListDetails', array('activity_id' => $data['activity_id'])) . ',"_blank","width=200,height=300")'

The problem is not create the url but the fact that linkHtmlOptions is set for the whole datagrid, while here is needed the record $data[‘activity_id’].

The $data variable is available in the urlExpression but not in the linkHtmlOptions.

So the solution here is to set the correct url to the link and get it with jquery

Thanks zaccaria

I didn’t even realize the thread was for CLinkColumn