Changing the Color of Column Headers
You can easily use styles to customize the grid's appearance. For more information about styles and available styles, see the Visual Styles and Customizing the Control's Appearance topics. In the following steps, you'll customize the appearance of one of the built-in styles to change the color of the column headers.
Complete the following steps:
1. Click once on the C1GridView control to select in, and navigate to the Properties window.
2. In the Properties window, set the VisualStyle property to Office2007Black.
3. Click the Source button to switch to Source view.
4. Add the following <style> tag to the <head> tag on your page, so that it looks like the following:
<head runat="server">
...
<style>
.C1GridView_Office2007Black .C1Heading TH
{
background: #ffff66;
height: 27px;
text-align: -moz-center;
border: solid 1px #4c535c;
vertical-align: middle;
border-right: none;
font-weight: normal;
color: #000;
border-top: none;
}
</style>
</head>
This will modify the background color of the grid's heading area so that it appears yellow.
What You've Accomplished
Run your application and observe that the column headers now appear yellow:
|