Change datagrid row color using value in a cell

Is there a way to change the color of a datagrid row based on a value in a cell in the row.

I have a table called dealcalendar with a column called schedule_color which contains an RGB for the color I want to assign to that row.

I have used the other examples here to color code other datagrids, but in this case, I want to do it based on the column value but I can't seem to access the data.

Here is the formula I have tried without success (if I assign the color manually it works fine)

Code is inserted in cellrender

args.Attributes.Add("style", $"background-color: {${getDealCalendersResult.FirstOrDefault().Schedule_Color()}};");

Any help is appreciated
PS I also tried creating a property that pulled the column value from ${result}


and put that in the cellrender formula

but that just gets the last color value

You should use ${event}.Data to access the current data item:

Ahhh! Perfect, I tried using ${event}, but was missing the Data....part...Thank you!!!