I have a Winforms .Net2.0 C# app using DataGridView with noneditable text data in it.
I woul like 14 pixel high rows... I use a font with fontsize=8.
DataGridView1.RowTemplate.Height = 14;
And I set every row to the same height in a loop:
DataGridView1.Rows[i].Height = DataGridView1.RowTemplate.Height;
My only problem is that in every row there is a 2 pixel hight empty area betwwen the text and the top border, and the last 2 pixels of the text are cut by the bottom border of the cells.
I need 1 pixel high cell borders, but I need to "shift up" the cell content with 2 pixels so the
How can I remove the 2 pixel top padding of the cells?
Maybe custom CellPaint needed?
I tried DefaultCellStyle.padding=new Padding(0), but did not helped...
I tried also set align to TopLeft, but not helped...