My datagridview wont update until I press a button?

Hi I have a problem I cannot understand.

I have created a form which has a datagridview.
When I start the application I fill in the datagridview by doing the following

Create a datatable and add its rows.
and then fill in the datagridview by:

dataGridViewSpelarUtv.DataSource = dt;

Then I change the height of the rows by:
for (int i = 0; i < dataGridViewSpelarUtv.Rows.Count; ++i)
{
dataGridViewSpelarUtv.Rows[i].Height = 18;
}

That's it!

But the problem is that the height doesn't change? the new values are added in the datagridview but the height is more than 18.
If I now press a button in the application that has this datagridview and call the same function that updates the datagridview the height is changed? Can someone please tell me why?
[864 byte] By [Tobbis] at [2007-11-20 11:49:55]
# 1 Re: My datagridview wont update until I press a button?
Ahhh, found out that if I set the RowTemplate.Height =18 before I added the data then all rows get height 18 and is also updated even if I don't press the button.
Tobbis at 2007-11-9 11:37:07 >