I have a model that includes three columns that hold a version number, in the form of major.minor.patch
I have a CGridView that displays this table and various actions that can be made on it.
I want to display the version number in a single column in the format major.minor.patch, however I also want to be able to filter by that column.
I found this post which points in the right direction . Using that, I have a
public $version;
In the model and
array(
'name'=>'version',
'value'=>'$data->version',
)
In the CGridView definition.
But I don’t know how to populate $model->version from my CActiveDataProvider definition. I can’t specify which columns to select, so I can’t add in a CONCAT for the three columns - or even if this is the right way to go about it.