Search code examples
c#winformsdatagridviewheight

changing the datagridview row height using rowtemplate but does not work


I have a DataGridView with two columns member name and member image.

I want to increase the height of each row in the DataGridView.

I set the value for the property but height doesn't change, any other property also I have checked I mentioned below.

I have tried like this for changing but any way it does not change the DataGridView row height...

var dgv = new DataGridView();
dgv.RowTemplate.Height = 30;

can anyone help on this?


Solution

  • Bind data or set gridview datasource after setting the dgv.RowTemplate.Height value, if already data loaded to grid rebind data ones setting above property.