how to set default dataGridView row Height

I am using a DataGridview while i am setting the height from the code it is not working

if (dgviewSearchResults.RowCount != 0)
{
foreach (DataGridViewRow row in dgviewSearchResults.Rows)
{
row.Height =5;
}
}

i am using the above code But it is not working for me




Answer this question

how to set default dataGridView row Height