NumericRangeMaskPart
Class
Represents a MaskPart which accepts numbers in a specified range.
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
C#
[ClientScriptResource("Telerik.Web.UI.Input.MaskedTextBox.MaskParts.NumericRangeMaskPart", "Telerik.Web.UI.Input.MaskedTextBox.MaskParts.RadNumericRangeMaskPart.js")]
public class NumericRangeMaskPart : MaskPart
Inheritance: objectMaskPartNumericRangeMaskPart
Inherited Members
Example:
This example demonstrates how to add a NumericRangeMaskPart object in the MaskParts collection of RadMaskedTextBox.
csharp
private void Page_Load(object sender, System.EventArgs e)
{
NumericRangeMaskPart rangePart = new NumericRangeMaskPart();
rangePart.LowerLimit = 0;
rangePart.UpperLimit = 255;
RadMaskedTextBox1.MaskParts.Add(rangePart);
}
csharp
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim rangePart As New NumericRangeMaskPart()
rangePart.LowerLimit = 0
rangePart.UpperLimit = 255
RadMaskedTextBox1.MaskParts.Add(rangePart)
End Sub
Constructors
C#
public NumericRangeMaskPart()
Properties
Gets or sets the smallest possible value the part can accept.
C#
public int LowerLimit { get; set; }
An integer representing the smallest acceptable number that the NumericRangeMaskPart can accept. The default value is 0.
Gets or sets the largest possible value the part can accept.
C#
public int UpperLimit { get; set; }
An integer representing the largest acceptable number that the NumericRangeMaskPart can accept. The default value is 0.
Methods
Returns the friendly name of the part.