We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Validation of controls

I have a GridControl. In the Grid columns there are several different controls NumericUpDown, MonthCalendar etc. Now, I expected that a NumericUpDown will not accept a non numeric value but it allows everything. I can also type "hello world!" into a MonthCalendar!!! It doesn''t make sense. Is there a way to make these controls self validate without code from my part (handling validation events)? Many thanks

1 Reply

AD Administrator Syncfusion Team March 10, 2006 07:27 AM UTC

Hi Hassan, For validating a numeric value cell the style.ValidateValue.NumberRequired property can be set to true and you can also set your own error message in the style.ValidateValue.ErrorMessage property. In order to validate a DateTime value cell the style.CellValueType can be set to typeof(System.DateTime). But this also throws the FormatException in the Output Debug window. Let us know if you have any further questions. Regards, Calvin.

Loader.
Live Chat Icon For mobile
Up arrow icon