RowRender background-color not working


I want to set the background-color of the grid row conditionally but it doesn't work - what I'm doing wrong?

protected void DataGrid0RowRender(Radzen.RowRenderEventArgs<Models.PDB.Pfuscherakt> args)
args.Attributes.Add("style", $"background-color: {(args.Data.Status == "Geschlossen" ? "yellow !important" : "white")};");


I read that but the style is not added to the resulting html not on tr or td - I can also use the code in the cellRender event

protected void DataGrid0CellRender(Radzen.DataGridCellRenderEventArgs<Models.PDB.Pfuscherakt> args)
args.Attributes.Add("style", $"background-color: yellow !important");

I found the problem - if I add the event in the designer it will not added to the code *razor.cs (bug) - that is why the grid isn't formated - after adding it direct in codebind it works now

RowSelect="@DataGridRowSelect" RowRender="@DataGridRowRender" AllowMultiColumnSorting="false"