Use the following code:
public RadForm1()
{
InitializeComponent();
this.radMaskedEditBox1.MaskType = MaskType.Numeric;
this.radMaskedEditBox1.Mask = "n3";
this.radMaskedEditBox1.ValueChanging+=radMaskedEditBox1_ValueChanging;
}
private void RadButton1_Click(object sender, EventArgs e)
{
this.Text = this.radMaskedEditBox1.Value + "";
}
private void radMaskedEditBox1_ValueChanging(object sender, CancelEventArgs e)
{
e.Cancel = true;
}
You will notice that even though the ValueChanging event is cancelled, the Value property is still changed.
Hi, Thomas,
Thank you for bringing this to our attention. Please excuse us for the inconvenience caused. We will do our best to introduce an appropriate solution.
Currently, the possible solution that I can suggest for numeric values is to use RadSpinEditor.
Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.