Trying to Mark sorted color

Hi

I am trying to mark column when I am pressing on the header to sort, by using “OnAfterSorting” event.
I Mark the column with :
this.forEachRow(function(id){
_this.setCellTextStyle(id,columnIndex,“background-color:#ADDFFF;”);
});
and i got 2 bugs:

  1. when I pick up a new column to sort I want to unmark the current marked, but I got bugs with the “even / uneven” different colors(because the sort change the id’s)
  2. the mouse hovering color is disapeared from the colored column and the picking cell color is disapeared too.

Does somebody have any id how I can solve the afterSorting column marking without bugs ?

great thanks

To remove styling just use

_this.setCellTextStyle(id,columnIndex,"");

it will clear all custom styles, and will restore normal coloring.