Hope this helps someone else!

Sep 2, 2008 at 7:13 PM
I found an interesting issue (not sure it's a bug) with the DataGrid that frustrated me for a good half hour so I wanted to note it here in hopes of saving someone else some time.

I had forgotten to place the 

<

data:DataGrid.Columns>

 

</data:DataGrid.Columns>

 

around my column definitions. When I compiled, I got no errors, so I was surprised to get the following error at runtime:

  Error in markup file 'Dashboard.xaml' Line 2 Position 7.

The interesting thing here is the line number, since line 2 has the usual namespace definitions.

It took me a while to figure out that what the error really means is Line 2 of the DataGrid definition, not the WPF page.

Adding the .Columns wrapper tags fixed the problem. Hope that helps someone else not have to fight the same issue.