private void dgvResult_CellPainting(object sender, DataGridViewCellPaintingEventArgs e) { try { if (e.RowIndex > -1) { if (e.ColumnIndex != -1) { e.Paint(e.CellBounds, DataGridViewPaintParts.All); using (Pen p = new Pen(Color.Black)) { cellImage(sender, e); e.Graphics.DrawLine(p, e.CellBounds.X, e.CellBounds.Top-22, e.CellBounds.X, e.CellBounds.Bottom-1); e.Graphics.DrawLine(p, e.CellBounds.Left - 100, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1); } e.Handled = true; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)