How to add new action link column for Yii CGridView

It is very simple to create custom columns in CGridView. While defining the columns, you have to define an array with specific values for the custom column. To create a column which points to another controller with ID parameter, use following code:

To add header for the column, modify the same array with an additional parameter for the header.

The entire widget for CGridView in view file will look like this: