Home > Code > C# > gridview header color

gridview header color

by san   on Jan 10, 2012   Category: C#   |  Views: 995    |  Points: 25   |  Bronze 


private void datagridview1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
if (e.RowIndex == -1)
{
Brush b = new TextureBrush(global::Textiles.Properties.Resources.image1);
e.Graphics.FillRectangle(b, e.CellBounds);
e.PaintContent(e.ClipBounds);
e.Handled = true;
}
}


Post Code  |  Code Snippet Home

User Responses


No response found, be the first to review this code snippet.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts