views:

150

answers:

1

First off I have a datagrid on the main form which is populated with about 7000 rows. It is bound (to ItemsSource) in the forms constructor. Everything runs extremely fast and smooth when the app loads (less than 1 sec). However when I want to load that same datagrid in another window it takes > 1 min. There is no difference in the xaml between pages. What could be causing this. I am using Virtualizing Stack panel as well as turning on Cell and Row Virtualization on the DataGrid. I have profile my Sql Server and the query runs in the same time for both calls so it's not a database issue.

I got curious and set up a listview and bound it to the same source on the second form and the same scenario happens as well.

What could be the issue?

A: 

Thanks Andrew. I figured it out but I think it's a bug. In my main form the datagrid is in row 2 column 2. In my calling form it was in row 0, column 0. When I made another row and moved the datagrid to it it loaded just like it did in the main form. The datagrid obviously didn't like being in row 0. It works now so I won't be using reflector to look at it.

zanderzone