When the update records, determine whether repeat, if repeated cancel the update record
How to implement
I have an example to upload
thanks
Hello Guo,
Thank you for your post!
I have been looking into your question. What I can suggest is to take a look at the following link, where a similar issue is discussed. On the second link you would be able to find more detailed information and also a sample application:
http://stackoverflow.com/questions/10114967/xamdatagrid-and-validating-a-cell-item-against-an-entire-collection ,
http://brianlagunas.com/validate-a-property-against-a-parent-collection/
Please do not hesitate to let me know if you have any further questions on this matter.
Thank you for your suggest
My problem is to modify one of the cell, found that repeated records, want to modify to cancel
What should I do?
I have been looking into your question and it seems, that I am missing something from your scenario.
Would you please provide me with more detailed information regarding the scenario, that you want to achieve? Do you want to check the value of one cell is existing in the records of the XamDataGrid or you want to verify, that the entire record is already in the records of the XamDataGrid?
Having this information would help me further investigate this issue for you.
Thank you for the provided information. Looking forward to hearing from you.
I have been further researching your issue and have created a small sample application for you. In the application I have handled the RecordAdded event, in order to get the new record, that the customer wants to add to the XamDataGrid.
Then in order to check if the record is duplicated to one of the already existing records in the grid I have handled the RecordUpdated event. In the handler of the event I am get the new record compare it to the rest of the records. If the value is already present I select the new record and call the DeleteSelectedDataRecords command of the XamDataGrid.
I have also changed the message of the MessageBox, that shows to warn the user, that this record is duplicated and to ask him if he wants to delete the record.
Please find the attached sample application and feel free to let me know if you have any further questions on this matter.
I want to check the value of one cell is existing in the records of the XamDataGrid