Input validation in WPF

Posted by irfanali-wpfexpert on Stack Overflow See other posts from Stack Overflow or by irfanali-wpfexpert
Published on 2010-06-13T15:28:55Z Indexed on 2010/06/13 15:32 UTC
Read the original article Hit count: 451

Filed under:
|
|

i am developing an application in wpf using MVVM design pattern. i have a listbox when an item is slected then a dialog is open having the same record in editable mode. this dialog is binded with the selected item of the list. i have apply the validation rule for textbox using IDataErrorInfo. when the user update a record on dialogbox then at every key press, the selected record in listbox is also changed. if the user press save button then i submit changes to database. but if user click cancel button then i do not submit changes to database but the list box is updated with the current updation in GUI. when i refresh the list then old value appears again. My requirement is to update the listbox only when the user hit the save button but not on every key press on dialog box. I first fill the generic list with the linq to sql classes then bind the listbox with it. Please let me know what i have to do.

Thanks in advance

© Stack Overflow or respective owner

Related posts about wpf

Related posts about input