日期:2014-05-17 浏览次数:20828 次
private void dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e) { if (e.ColumnIndex == 2) { e.Handled = true; using (SolidBrush brush = new SolidBrush(Color.Red)) { e.Graphics.FillRectangle(brush, e.CellBounds); } ControlPaint.DrawBorder(e.Graphics, e.CellBounds, Color.Yellow, ButtonBorderStyle.Outset); } }