There are quite a few issues here:
- First thing is that
==
is always required for comparison in C# (=
is used for assignments). This is just C# basics. - The actual value of Deals_SaleTp is probably not
"New"
as nchar columns have padding characters. So unless the column is nchar(3) the actual value of the property will end with some whitespace characters. This can be easily checked via debugging. If this is the case you should use StartsWith:args.Data.Deals_SaleTp.StartsWith("New")
- You can't set the background color of a row in the RowRender event.. You didn't say what event you are using but if it is RowRender you should use CellRender instead.