Telerik Forums
UI for WinForms Forum
1 answer
68 views

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.

Dinko | Tech Support Engineer
Telerik team
 answered on 28 Jul 2023
1 answer
41 views

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

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 May 2023
1 answer
351 views

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 ?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Dec 2022
1 answer
51 views
Hello Team,

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

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 May 2022
1 answer
92 views

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

}

}

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 05 May 2021
1 answer
72 views

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 ((###) ###-############)

 

Nadya | Tech Support Engineer
Telerik team
 answered on 26 Apr 2021
2 answers
66 views
How can you set so that the text is not lit when the control receives the focus?
Eusebio
Top achievements
Rank 1
Veteran
 answered on 16 Dec 2020
10 answers
118 views
Hi all,

I’m trying to simulate the MaxLength property (which is no longer available) on a RadMaskEditBox and I use:
radMaskedEditBox1.MaskType = MaskType.Standard; 
radMaskedEditBox1.Mask = “aaaaa”;

I set programmatically a first value in my RadMaskedEditBox1, “ABCDE”. The displayed value on my control is, as expected, “ABCDE”. 

Then I try to set another value, "XX”, and I notice that de displayed value of the control is “XXCDE”.

Any idea? How can I use masks to limit the chars n° in the RadMaskEditBox?
Thank you


L.E.: RadControls version 2013.3.1127.40
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Oct 2020
8 answers
381 views
Hi,

I am using the 2011.2.11.712 build of the WinForms controls.  When I set the RadMaskedEditBox MaskType to "Email", it works correctly and shows the icon when the value is invalid.

But, how do I detect in code that the validation failed? 

I have a form where the user enters an email address and I want to detect that the user entered an invalid value and not allow the save but rather show an error message.

Thanks
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 07 Sep 2020
6 answers
1.3K+ views

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

pierre-jean
Top achievements
Rank 1
Veteran
Iron
 answered on 25 Jul 2020
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
Buttons, RadioButton, CheckBox, etc
DropDownList
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
Tabstrip (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
GanttView
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
VirtualGrid
ContextMenu
Spreadsheet
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
Rotator
TrackBar
MessageBox
CheckedDropDownList
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
CAB Enabling Kit
TabbedForm
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ImageEditor
ScrollBar
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
CalculatorDropDown
Localization
TimePicker
ValidationProvider
FontDropDownList
Licensing
BreadCrumb
ButtonTextBox
LocalizationProvider
Dictionary
Overlay
Security
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
Flyout
TaskbarButton
HeatMap
SlideView
PipsPager
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?