Validation Question

Nov 26, 2010 at 8:44 PM
Edited Nov 26, 2010 at 8:44 PM

I have your validators working correctly on the screen and they work well.

My problem is when validation errors are present, I wish to disable the Save Button by return FALSE from a CanSaveCommand method in my view model.

Can you please suggest how to do this.  It is not obvious how to do this.

 

Coordinator
Dec 23, 2010 at 3:30 PM

Hi Tom,

Can you give me some more details - or even better an example project that shows the problem you are having and what you'd like to do?  I'm not sure I completely understand your goal - it seems like you could just have a "validationOK" field on your ViewModel that you trip and it is checked on all the CanExecute handlers that require validation - but I'm sure you've tried that.

mark

Dec 23, 2010 at 11:52 PM

I have not tried that solution, but I found ValidationManager.Validate(this,null) method.  I called that in SaveCanExecute handler and it solved my problem.