How to set the color of row?

Hello,

  1. I can set the cell color like this:
    void CellRender(CellRenderEventArgs args)
    {
    if (args.Column.Property == "Company")
    {
    args.Attributes.Add("style", $"background-color: {(true ? "#ff6d41" : "white")};");
    }
    }

  2. but i can't set the row color like this:
    void RowRender(RowRenderEventArgs args)
    {
    args.Attributes.Add("style", $"background-color: {(true ? "#ff6d41" : "white")};");
    }

  3. I want to set the row color by my self, how can i do that

Thanks!

You will need to set cell color to transparent if you want your row color to be visible.

I have Code which work well:

args.Attributes.Add("style", $"background-color: {(args.Data.DBMS_DB_Type=='B' ? "red" : "white")};");

but if I add Code like below:
{
If (args.Column.Property=='DBMS_DB_Type')
{
args.Attributes.Add("style", $"background-color: {(args.Data.DBMS_DB_Type=='B' ? "red" : "white")};");
}
}
I have a compilation error:
; expected

Where I forgot ';' - this sign

It work, but capital 'I' in condition 'If...' confused compilator

In new version of radzen 2.58 don't work error CS0019

I am closing this thread as it doesn't meet the minimum quality requirements. There is no description of the problem, no code provided, no screenshot etc.