I'm not 100% sure, but I think that the 4th parameter of the function `formatColumn` takes a string to label the field for sorting, so if you do something like
Code: Select all
$cm->formatColumn($columnName, $format, array(), 'sortName');
and then sort by 'sortName' it should sort on your new column.
Please correct me if I'm mistaken.