change row color depending of the value of a cell

Hello,

Is there a way to change the color of a row depending of the value of a cell.
If in the row, value of column X = Y then row should become red.

Thanks

Please, try to do something like this:
if (mygrid.cells(rId,column_index).getValue()==“Y”){
mygrid.setRowColor(rId,“red”)
}