Skip to content

Is there some way to get the final value of an edited cell in datagrid in the view model? #7310

@ComptonAlvaro

Description

@ComptonAlvaro

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions