Hi
I have a scenario where i have to update(or reject) the changes to the cell values of an editable row on click of a Save/cancel button which is not in the grid.
Only one row is editable at a time and the user has to either update/cancel through the save/cancel button before moving onto the next row.
The default behavior as i understand updates a cell value once an editable cell loses focus (OnEditModeEding event) and i even tried using the EditModeEnding event but managed to control the updation only at a cell level.
even tried using
XamDataGrid.ExecuteCommand(DataPresenterCommands.CommitChangesToActiveRecord)
XamDataGrid.ExecuteCommand(DataPresenterCommands.DiscardChangesToActiveRecord)
with UpdateMode = OnUpdate
but I'm still stuck
Am i missing something ?
Any help would be really appreciated
Thanks in advnce
Abhilash
Hi Guys,
Is this not possible in XamDataGrid ?
Waiting for an answer....
Regards
Hello Abhilash,
I am currently investigating the problem. It seems like you can use the RecordUpdating event and set e.Action to Cancel and Discard Changes. I will post a follow up here as soon as possible.
Alex.
Hello again,
there seems to be an issue with the update cancelling events and the corresponding commands. There is workaround to your problem however. You can save the current record (temp) before you start updating it and when you click the button you can either revert the changes (with the temp record ) or accpect it (do nothing).
Hi Alex,
Sure,take your time.