Use the following code snippet and enter "8,5" in RadMaskedEditBox. Then press Tab to navigate to the next control:
RadValidationRule validationRuleNumberLess;
RadValidationRule validationRuleNumberGreater;
float numberMaximum;
float numberMinimum;
public RadForm1()
{
InitializeComponent();
CultureInfo culture = new System.Globalization.CultureInfo("de-DE");
System.Threading.Thread.CurrentThread.CurrentCulture = culture;
System.Threading.Thread.CurrentThread.CurrentUICulture = culture;
this.radMaskedEditBox1.Culture = culture;
this.numberMaximum = float.Parse("9,999", culture);
this.numberMinimum = 0;
// set maximum
this.validationRuleNumberLess = new RadValidationRule();
this.validationRuleNumberLess.AddControl(this.radMaskedEditBox1);
this.validationRuleNumberLess.Operator = Telerik.WinControls.Data.FilterOperator.IsLessThanOrEqualTo;
this.validationRuleNumberLess.PropertyName = "Value";
this.validationRuleNumberLess.ToolTipTitle = "Too big";
this.validationRuleNumberLess.ToolTipText = "The value must be SMALLER than " + this.numberMaximum.ToString();
this.validationRuleNumberLess.Value = (float)this.numberMaximum + 0.001D;
this.radValidationProvider1.ValidationRules.Add(this.validationRuleNumberLess);
this.radValidationProvider1.SetValidationRule(this.radMaskedEditBox1, this.validationRuleNumberLess);
// set minimum
this.validationRuleNumberGreater = new RadValidationRule();
this.validationRuleNumberGreater.PropertyName = "Value";
this.validationRuleNumberGreater.ToolTipTitle = "Too small"; // this.localToolTipTitle;
this.validationRuleNumberGreater.ToolTipText = "The value must be BIGGER than " + this.numberMinimum.ToString();
this.validationRuleNumberGreater.Operator = Telerik.WinControls.Data.FilterOperator.IsGreaterThanOrEqualTo;
this.validationRuleNumberGreater.Value = (float)this.numberMinimum;
this.validationRuleNumberGreater.AddControl(this.radMaskedEditBox1);
this.radValidationProvider1.ValidationRules.Add(this.validationRuleNumberGreater);
this.radValidationProvider1.SetValidationRule(this.radMaskedEditBox1, this.validationRuleNumberGreater);
this.radLabel1.Text = "Minimum = " + this.validationRuleNumberGreater.Value + " Maximum = " + this.validationRuleNumberLess.Value;
}
Workaround: use the ControlValidation event to control the validation flag: https://docs.telerik.com/devtools/winforms/controls/validation-provider/validation-rules#controlvalidation-event
EMailMaskTextBoxProvider does not allow TLDs which are longer than 4 characters. Example:
user123@example.com works;
user123@example.cloud does NOT work
There are many TLDs which are longer than 4 characters nowadays (.museum, .store, .website, .technology etc.), which makes this limitation a major bug.
RadMaskedEditBox - (2019.3.903.40) - Text property not respecting numeric mask formatting on Up, Down keys
To repeat the bug create the RadMaskedEditBox and set the next properties:
this.radMaskedEditBox1.Mask = "N0";
this.radMaskedEditBox1.MaskType = MaskType.Numeric;
Enter the 111 in the editor. With the up/down keys set all of the values to 0.
Expected value is 0, got 000.
To reproduce:
this.radMaskedEditBox1.Mask = "n";