Overridable function for sorting columns