How can I give an hex color code to gridview’s row background color? I know that it is to be given on a rowdatabound event. But I am not sure whether a hex color code can be given or a default – System.Drawing.Color.(ColorName) would only work?
How can I give an hex color code to gridview’s row background color? I
Share
You need to assign a
System.Drawing.Colortype. But you can easily get the instance from hex or named values like shown below:named colors:
Also, you can directly specify the background/foreground color in the markup for gridview:
You can use both named and hex values.