RadTimePicker not validating

Mar 29, 2012 at 3:50 PM

Hi Geert,

I have a textbox where you should enter a time (TimeSpan) smaller then 23:59. I have added a check to the ValidateFields method in the coresponding model. also I added ValidadesOnDataError=True, NotifyOnValidationError=True to my view. I get error's when i enter a time bigger then 23:59 so this works al fine.

Now I want to use the telerik RadTimePicker. I have replace the TextBox with the RadTimePicker and added ValidadesOnDataError=True, NotifyOnValidationError=True to the binding statement like in the TexBox. When I change the time now the ValidateFields method is not called anymore so validation fails.

Can I force this control or any custom control to call the ValidateFields method? Or should I maybe make my own control deriving from RadTimePicker and add some interface or implementation?

Any ideas?

Mar 29, 2012 at 4:00 PM

Did you set the binding mode to TwoWay? If I remember correctly, you are using WPF. Most controls in WPF perform a 2-way binding by default, but the RadControls hardly do...

Mar 30, 2012 at 7:20 AM

I feel silly but your are right. Sometimes you are looking too far while the answer is right in front of you :(