I have Xamgrid in when when the user edits value I am show a messagebox
If value >20 then it should show message that is value you entered is > 20 ok/cancel
Ok should restore value and cancel should bring back the whole value
What should be done so that cancel restores the original value?
In cell exited edit mode I have
if (e.Cell.Row.RowType == RowType.DataRow) { if (null != e.Cell.Row.Data) { xxx data = e.Cell.Row.Data as xxx; if(data.field1 > 20) { MessageBoxResult result = MessageBox.Show("adjust value by 20.OK/Cancel?", "xxx", MessageBoxButton.OKCancel);
if (result == MessageBoxResult.Cancel) { } } } }
Hi,
Use the CellExitingEditMode event.
If canceled, you can set e.Cancel = true;
-SteveZ
Doing this it gets triggered multiple times but the cancel does not show old value in the xamgrid cell
Anything that must be missing in the line of code i have above
The old value will still be in the cell.
So you actually wouldn't have to do anything if you set e.cancel to true, as the value was never updated.
Any help on this it just keeps popping the message sample would help
Can you provide sample
I have e.cancel but it just stays on the textbox
The messagebox gets called everytime Cancel is clicked