0

I'm using CollectionViewSource and EntityFramework in my WPF project, and whenever user insert or edit a record, and want to save it, I will find it like this

(MyCVS.View as ListCollectionView).IsAddingNew

Or

(MyCVS.View as ListCollectionView).IsEditingItem  

But sometimes user is in a Edit or Insert mode but those property are false
I want to know when and how those properties change to false.

Thanks In Advance

har07
  • 88,338
  • 12
  • 84
  • 137
mohammad jannesary
  • 1,811
  • 1
  • 26
  • 27

1 Answers1

0

IsAddingNew and IsEditingItem are only true when you are in the middle of an add or edit transaction, which you start by calling AddNew and EditItem respectively.

If neither you nor the framework code behind your views call these methods then you are only going to get false values out of the properties.

Jon
  • 428,835
  • 81
  • 738
  • 806