Walaa wrote:
I guess it's not a bug.
As it's normal for the cancelEdit to set the IsChanged to false.
True, that's also what I was thinking when I wrote the code But imagine that you have a set of entities in a grid, you alter cell 'CompanyName' on row 3. You move away from the row to row 4. This means that the cell's change is final, the field is marked 'IsChanged'. Now, you move back to row 3, CompanyName, change what you wrote as you think you made a mistake, then you realize it WAS correct and hit ESC. At that moment it reverts to your changed value but IsChanged is false!
So it should set isChanged to false only if it was false before BeginEdit.