Force validation of ria entity in Silverlight 4 -


I have a situation in which I will load invalid data. I am using a data format to edit the data and I need to apply a verification that the user can not normally edit the fields that are invalid, but before saving the unit I would like to inform the user that they need to edit. But the recognition does not seem to change until the property actually changes. Is there any way to force a unit to run a client-side verification rule?

Shane holder

I found this exact problem I used to see my viewmodel INOTifyDataErrorInfo was implemented on the base class), and the validation reference is validated in this way ...

  // Existing verification errors have already been registered. CurrentUser.ValidationErrors .clear (); Var validation result = new list & lt; Validation reset & gt; (); Validation content vcontext = new verification (current user, blank, empty); // user valid; The result is added to our verification list. Result Valuerator. TrialValidateObject (CurrentUser, vcontext, validationResults); // Insert errors in the foreach in the verification error list (different types of results in verification) {CurrentUser.ValidationErrors.Add (res); }  

I can not remember the top of my head, but if it does not trigger the validity conditions on your scene (there is a red border on the text box), then the errors Add Viewmodel's verification array archive (built in the implementation of INotifyDataErrorInfo).

  // Verify errors in the foreach of the voidodil list (different types of results in validation) {CurrentUser.ValidationErrors.Add (res); }  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -