I have a datagrid that binds to a collection in my view model.
The user can edit a cell that is a decimal and bind to a decimal porperty of the item source.
I would like to know, when the user press the return key or the cell loses the focus, to fire a command in my model to update the item in the database.
The problem is that the events that has the datagrid is ending editing, so it is before the new value is commited.
I know that I could subscribe to the event of notify property of the item source, so when the property is changed, I would have the new value and I could do what I need. But really it makes me to subscribe and unsubscribe to the event every time I update the collection.
Isn't there a better solution? Why there is not an event that it could be CellEndEdit and not only CellEndingEdit?
Thanks.
I have a datagrid that binds to a collection in my view model.
The user can edit a cell that is a decimal and bind to a decimal porperty of the item source.
I would like to know, when the user press the return key or the cell loses the focus, to fire a command in my model to update the item in the database.
The problem is that the events that has the datagrid is ending editing, so it is before the new value is commited.
I know that I could subscribe to the event of notify property of the item source, so when the property is changed, I would have the new value and I could do what I need. But really it makes me to subscribe and unsubscribe to the event every time I update the collection.
Isn't there a better solution? Why there is not an event that it could be CellEndEdit and not only CellEndingEdit?
Thanks.