get cell bg color after enableAlterCss


I am using the following command to get a cells background:
var currentColour = dataGrid.cells(SELECTED_ROW, 0).getBgColor();

This is working successfully.

However I am also defining the grid using: dataGrid.enableAlterCss(“even_row”,“odd_row”); to make even numbers blue.

When i try to getBgColor() on an even number, I get the default color(#FFFFFF) instead of blue.

Is this normal?


I am thinking i need to get the row color for this one!

This is expected behavior. When you are setting row’s alternate color, background color code is added to style attribute, not to the bgColor()