What I am trying to achieve is in the view I am rendering CGridView and in one of the columns I would like to display the hours to the respective name. Now in the CGridView I have a column which displays the name and another which should display the hours. How can I inject the array which was passed from the controller so I can display a value of the respective name.
Here is the columns section which I am struggling with:
Thank for your reply seenivasan. I should’ve mentioned that the project is running on PHP 5.1 hence anonymous functions are not supported. Any other ides?
It would not be the same. The thing is that I am generating this array with a heavy query. So what I am trying to prevent is call that query for every row generated by CGridView so I am trying to pass all the data via controller and then reuse it in the form of an array but I cannot seem to find a way to inject that array into CGridView which is a pain in the but