Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hiding grid lines in specific row in DataGridView

I want to get a blank row. So I want to hide grid lines in a specific row. How can I do this?

There is

Grid.CellBorderStyle = DataGridViewCellBorderStyle.None;

but this can be applied to the grid.

like image 788
Novikoff Avatar asked Jan 17 '13 13:01

Novikoff


1 Answers

Untested, but you should be able to get what you need by handling the CellPainting event and excluding the DataGridViewParts.Border

  e.Paint(e.ClipBounds, DataGridViewPaintParts.All ^ DataGridViewPaintParts.Border);
  e.Handled = true;
like image 110
hometoast Avatar answered Oct 06 '22 07:10

hometoast