Home Forums WPF controls Xceed DataGrid for WPF Cell not saving value

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #25047 |

    In my grid, the value I am entering in the column is not being saved back to the bound object property. It displays the value of the property, so I presume binding is OK, lets you edit it but the property is not updated. I have double checked in grid.ItemsSource and that is not updated either. The cell has no CellEditor, just the default xceed editor. What might I be missing ?

    Imported from legacy forums. Posted by Matt (had 539 views)

    Xceed Support
    Member
    Post count: 5658

    Can you give some more information on this matter…

    Are you observing the data item’s values before or after edition of the row has completed (by either pressing ‘Enter’ or changing the current row ) ?

    Imported from legacy forums. Posted by Marcus [Xceed] (had 227 views)

    User (Old forums)
    Member
    Post count: 23064

    Is there any way to change when EndEdit happens? For example, I’ve found my users are making some edits in the grid and then immediately pressing the Save button. Since they aren’t pressing enter or moving rows no updates are saved. Ideally I’d like the binding to update the source real-time, like binding to a text box. That way I could monitor the source and enable the Save button when the property is changed.

    Imported from legacy forums. Posted by Travis (had 390 views)

    User (Old forums)
    Member
    Post count: 23064

    I believe I was able to handle this by invoking the EndEdit method on the active cell from the save button click event.

    Imported from legacy forums. Posted by James (had 365 views)

    User (Old forums)
    Member
    Post count: 23064

    Yes, that is true. Ideally though I would like the cell to be an auto-updating two-way binding. I don’t want to enable the save button until something has changed, but since the cell doesn’t update the associated bound field until EndEdit is called, I have no way to know to enable the Save button.

    So, I can’t click Save because nothing is marked as changed, but nothing will be marked as changed until I click Save. It’s a Catch 22.

    I’ve currently just set the Save button to always be enabled, but this isn’t the optimum solution.

    Imported from legacy forums. Posted by Travis (had 4322 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.