Hai,
In Xamdatagrid - OnCellUpdating, I need to cancel cell updating based on the value that is going to get update on the cell. I'm able to get only the value that is present/exist in the cell but how to get the value that is going to get update in the cell on 'OnCellUpdating' event?
Thanks,
Sasikumar
Hello Sasikumar,
I have created a sample project for you where I implemented the functionality you want. Basically I created a Style for the XamTextEditor and handled its ValueChanged event and in the handler a added comment how you can revert to the old value if the new one doesn't pass your checks. Also you will have to create Styles for all the Editors that your XamDataGrid uses.
Hope this helps you.
Thanks for your reply. Your solution is fine. But, while pasting from clipboard to grid, I need to get the value that is going to get update in the cell on 'OnCellUpdating' event. How to get it? Thanks in advance.
Sasikumar.
Thank you for your post. I have been looking into it and I can suggest you use the following code in the CellUpdating event handler:
var newValue = CellValuePresenter.FromCell(e.Cell).Editor.Value;
in order to get the new value. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.