Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items.
How to change background color in table row programmatically ? The cell property "Background" does not work.
0
IvanY
Telerik team
answered on 27 Dec 2012, 01:46 PM
Hi Andrei,
To set the background color of a table row, you need to set the background colors for all the cells in the row.
You can set the background color of the textbox in the cell like this:
However, the suggested approach for changing the styles of items at run time is by using Conditional Formatting, as it gives you great flexibility over the styling of items.
Another approach is to combine Bindings with User Functions. You can bind the Style.Background property of certain items to your custom user function which returns System.Drawing.Color and you can pass the value of the cell as an argument to that function. This way you can work with the runtime data and provide more complex custom over the color that will be returned.
Kind regards,
IvanY
the Telerik team
HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!