You have to import namespace System.Drawing.
And then use the following piece of code to change color from code behind :
// For Html color code
grdv.BackColor = ColorTranslator.FromHtml("#f4f4f4");
// for C# color
grdv.ForeColor = System.Drawing.Color.Black;

0 comments:
Post a Comment