WPF DataGrid, application crash when adding a row

前端 未结 6 1676
青春惊慌失措
青春惊慌失措 2021-02-08 02:29

I have a wpf datagrid bound to a TrackableCollection. In some rare occations, and for only a few selected users, the application will crash when the user adds a new record by en

6条回答
  •  你的背包
    2021-02-08 02:55

    I would try to check for nulls on your properties in your view model. If the property is null, replace the null with a valid value like a 0 or a blank.

    You could also do this using a Value Converter

提交回复
热议问题