I am looking for a way to apply css to individual cells in a column depending whether it has been sorted.
Example: 3 column data grid (col1, col2, col3). Default sort order is applied to col1 through cssClass like this:
"cssClass"=>array(
"td"=>function ($row, $columnName) {
if ($col1=="Percent1") {
if ((float)($row["Percent1"]) < 49.50) {
return "redclass";
} elseif ((float)($row["Percent1"]) < 69.50) {
return "yellowclass";
} else { return "greenclass"; }
}
}
)
I would like to apply this same cssClass config to a different column dynamically when the alternate column is clicked to sort.
Example: user clicks on col2 -> apply cssClass to col2 cells.
Thanks for the input.