WPF datagrid cannot add a row after binding to collection with data

喜夏-厌秋 提交于 2019-12-08 09:16:47

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!