RowRender background-color not working

Hello,

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")};");
}

robert

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"

I am experiencing the same thing, so I don't think it has been fixed...When adding the cellrender or rowrender it should append it to the grid in the .razor page file.

But adding it manually is a work around.