Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the row height of a DataGridView

Tags:

c#

c#-2.0

How can I change the row height of a DataGridView?

I set the value for the property but height doesn't change. Any other property has to be checked before setting this one.

like image 423
karthik Avatar asked Jul 30 '10 09:07

karthik


2 Answers

You need to set the Height property of the RowTemplate:

var dgv = new DataGridView(); dgv.RowTemplate.Height = 30; 
like image 60
Rob Avatar answered Sep 24 '22 11:09

Rob


You can set the row height by code

dataGridView.RowTemplate.Height = 35; 

or by property panel

enter image description here

like image 23
daniele3004 Avatar answered Sep 21 '22 11:09

daniele3004