private void dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
for (int c = 0; c < dataGridView1.ColumnCount; c++)
{
if (e.RowIndex < 0&& e.ColumnIndex == c)
{
Font drawFont = new Font("Microsoft Sans Serif", 10);
SolidBrush drawBrush = new SolidBrush(Color.Black);
e.Graphics.DrawImage(Properties.Resources.title_bg_center, e.CellBounds);
e.Graphics.DrawString(dataGridView1.Columns[c].HeaderText, drawFont, drawBrush, e.CellBounds);
e.Handled = true;
drawBrush.Dispose();
}
}
}