Data Binding Error retrival

Posted by saurabh on Stack Overflow See other posts from Stack Overflow or by saurabh
Published on 2010-05-01T03:28:36Z Indexed on 2010/05/01 3:37 UTC
Read the original article Hit count: 233

Filed under:

Hello

My scenarion is this

1- i have a Form which is dynamically generated with some XML configuration information.

2- i am attaching Data Binding for a textbox in Text_Loaded event a well as Validation Rules and i am attaching Validation.AddErrorHandler for showing message boxs

3- Data Source for the binding is a DataTable.

4- I am having record navigation buttons on the form generated in step 1 (Next,Last,First,Previous)

5- If user edits data with invalid values in record no 1 validation fires and it creats a red border

6-user press Next button to navigate to record no 2 but does not update error field in record no 1 i.e. she leaves record no 1 with some error not in my data source but on the form.

7- She came back to record no 1 , here my problem begins , Record no 1 is updated with old values and does not show error which she made.

i know that ValidationRules will not allow wrong input to update my data source which is fine but i need to handle point no 7 , there is no direct way to handle this situation , any help is much appriciated

© Stack Overflow or respective owner

Related posts about wpf-binding