I am using the RadMaskedEditBox to limit the user input. I need to allow the user to enter values from 0.0 to 999.9. I was using a MaskType of Standard with a Mask of 999.9 or ###.#...however, this is forcing the user to enter numbers that are < 100 as 099.0. The users down't want to enter 0 for any value below 100, this is a real pain for them. so, I switched it to using a MaskType of Numeric and setting the Mask to N1, but this has its own problem of allowing the user to enter 9999999.9, which when saved, thows an error (the underline field is only 5 characters). Since there is no MaxLenth field on this control, I need a better method. I looked at using REGEX as the masktype, but, to this date, I still struggle with REGEX EXPRESSIONS and how to create an REGEX Expression to make this work. Anyone help me out here.
Thanks.
Never did this before, but I need to make a custom change to a control that will affect all instances of it throughout the application. If the user clicks in a masked edit control at any position and the control is empty, the cursor should jump to position 1. It works fine when I use the event handler of the control directly like this:
private void mtbHomePhone_Click(object sender, EventArgs e)
{
if (mtbHomePhone.Value?.ToString()?.Length == 0)
{
mtbHomePhone.SelectionStart = 1;
mtbHomePhone.SelectionLength = 0;
}
}
I'm trying to inherit from the control like this (using MyMaskedEdit in the designer.cs in place of RadMaskedEditBox) but the event is not firing. What am I doing wrong?
using Telerik.WinControls.UI;
namespace VisionUI.Common
{
public class MyMaskedEdit : RadMaskedEditBox
{
protected override void OnClick(EventArgs e)
{
base.OnClick(e);
if (this.Value?.ToString()?.Length == 0)
{
this.SelectionStart = 1;
this.SelectionLength = 0;
}
}
}
}
Thanks
Carl
Hi,
I'm getting weird / unexpected behaviour when using the masked edit box configured to handle IP Addresses.
So using the latest Demo Application, I open up the Masked Edit Box, and in the IP edit box I type in 11.22.33.44
I then double click and highlight the 44 part, and type 6 to replace the 44 with a single 6, however the following is displayed
After clicking on OK this then changes to show the ip address as 11.22.33.255 It seems that clicking on 6 does not replace the 44 but gets inserted at the start of the element. Is there a workaround for this behaviour ?
In our application, we are using RadMaskedEditbox for the Phone and Fax values.
We are using the property for MaskType is Standard & Mask is (###) ###-#### & & & & & & & &
Here we need to allow only the numeric value, not special characters. (Do not allow them to enter the hyphen.)
The problem is: https://prnt.sc/xsW5oONnZLN4
Hi. I want to bring a custom control that inherits from RasMaskedEditBox. But onKeyDown and OnKeyPress events do not fired.
public class myMask: Radmaskededitbox
{
protected override void OnKeyDown(KeyEventArgs e)
{
//My codes
}
}
Hi Team,
When click or double click in the field and the full number doesn't get highlighted on the RadMaskedEditbox.
Video Link : https://ttprivatenew.s3.amazonaws.com/pulse/suganya-gmail/attachments/16655538/TinyTake24-04-2021-01-52-14.mp4
We need to load the Phone number Textbox value as 713-000-0000 ("(###) ###-####") while loading but when i try to enter the value the RadMaskedEditbox value it should allow to type 18 characters ((###) ###-############)
Hello When I change the font of a radmaskededitbox, the font family changes correctly, but the size seems to be wrong.
here is how I change the font:
Dim meb As RadMaskedEditBox = TryCast(ctrl, RadMaskedEditBox)
meb.Font = NewFont
meb.Controls(0).Font = NewFont
meb.MaskedEditBoxElement.Font = NewFont
Atteched a screen copy where all controls fonts are set to "Comic Sans MS;9pt" and the radeditmaskedboxes show larger fonts
Any suggestion ...
thanks in advance
Pierre-Jean