New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Kendo UI MaskedTextBox component

Definition

Constructors

Initializes a new instance of the MaskedTextBox class.

C#
public MaskedTextBox(ViewContext viewContext)
Parameters:viewContextViewContext

Properties

Specifies whether the widget will replace the prompt characters with spaces on blur. Prompt chars will be shown again on focus (available since Q2 2014 SP1).

C#
public bool? ClearPromptChar { get; set; }

Specifies the culture info used by the widget.

C#
public string Culture { get; set; }

Enables or disables the textbox

C#
public bool? Enable { get; set; }

Sets a value controlling how the color is applied.

C#
public FillMode? FillMode { get; set; }

Specifies the inputmode attribute of the inner <input /> element. It is used to specify the type of on-screen keyboard that should be displayed when the user focuses the input.

C#
public string InputMode { get; set; }

Adds a label before the input. If the input has no id attribute, a generated id will be assigned. The string and the function parameters are setting the inner HTML of the label.

C#
public MaskedTextBoxLabelSettings Label { get; }

Specifies the input mask. The following mask rules are supported: 0 - Digit. Accepts any digit between 0 and 9.; 9 - Digit or space. Accepts any digit between 0 and 9, plus space.; # - Digit or space. Like 9 rule, but allows also (+) and (-) signs.; L - Letter. Restricts input to letters a-z and A-Z. This rule is equivalent to [a-zA-Z] in regular expressions.; ? - Letter or space. Restricts input to letters a-z and A-Z. This rule is equivalent to [a-zA-Z] in regular expressions.; & - Character. Accepts any character. The rule is equivalent to \S in regular expressions.; C - Character or space. Accepts any character. The rule is equivalent to . in regular expressions.; A - Alphanumeric. Accepts letters and digits only.; a - Alphanumeric or space. Accepts letters, digits and space only.; . - Decimal placeholder. The decimal separator will be gotten from the current culture used by Kendo.; , - Thousands placeholder. The display character will be gotten from the current culture used by Kendo. or $ - Currency symbol. The display character will be gotten from the current culture used by Kendo..

C#
public string Mask { get; set; }

The configuration for the prefix adornment of the component.

C#
public MaskedTextBoxPrefixOptionsSettings PrefixOptions { get; }

Specifies the character used to represent the absence of user input in the widget

C#
public string PromptChar { get; set; }

Sets a value controlling the border radius.

C#
public Rounded? Rounded { get; set; }

Rules member.

C#
public Dictionary<string, object> Rules { get; }

Sets the size of the component.

C#
public ComponentSize? Size { get; set; }

The configuration for the suffix adornment of the component.

C#
public MaskedTextBoxSuffixOptionsSettings SuffixOptions { get; }

Specifies whether the widget will unmask the input value on form post (available since Q1 2015).

C#
public bool? UnmaskOnPost { get; set; }

Specifies the value of the MaskedTextBox widget.

C#
public string Value { get; set; }

Methods

GetElement method.

C#
protected override TagBuilder GetElement()
Returns:

TagBuilder

Overrides: WidgetBase.GetElement()

Serializes the component settings to a dictionary.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

A dictionary of settings.

Overrides: WidgetBase.Serialize()

Implements: IFormEditor.Serialize()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: WidgetBase.SerializeSettings()

Writes the HTML content.

C#
protected override void WriteHtml(TextWriter writer)
Parameters:writerTextWriter

The text writer.

Overrides: WidgetBase.WriteHtml(TextWriter)

WriteInitializationScript method.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

Overrides: WidgetBase.WriteInitializationScript(TextWriter)