问题
I have a wpf applicatiion with multiple datagrids, all bound to seperate ObservableCollections of custom objects. When the collections are empty, i see a blank row and I can add data.
However, when I add objects to the collections programmatically (read from XML), ONE of the datagrids does not show a blank row and does not allow me to add data, while the others do.
I have checked the cunstructors of all objects to be public, and I refresh all datagrids programmatically after I add objects the collections. All datagrid have the property CanUserAddRows set to true.
Has anybody have an idea what could be the reason? I could not find any answer through a search here.
JW
来源:https://stackoverflow.com/questions/14955601/wpf-datagrid-cannot-add-a-row-after-binding-to-collection-with-data