Do not create columns with data bindings.

Mar 11, 2013 at 11:30 AM
Edited Mar 11, 2013 at 11:32 AM
Hello!

I periodically work with the project at the in VS 2012, and in the studio in VS 2010.

Do not know why but when I try to bind my collection of objects (ObservableCollection) with the inclusion of auto-generated columns, I found that no columns are created with Visual VS 2010 and in VS 2012 are created with.

DataGrid to debug the code in the function argument is DataGrid.GenerateColumns iItemProperties, it is a property ItemProperties of its type ReadOnlyCollection <ItemPropertyInfo>, studio in 2010, this property null, so the columns are created. In 2012, this property contains a collection of properties, so there are created with the columns.

While written some code that gets the object properties and working with this collection.
The case may not be a studio can be a framework.

Where initialized iItemProperties.ItemProperties?


The type of objects used in a collection (ObservableCollection), I generate a runtime using TypeBuilder and Emit functions.