Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Collapse]Data Editors
   [Expand]Product Information
   [Collapse]Common Concepts
     Binding to Data
    [Collapse]Mask Editing
      Mask Editing Overview
      Mask Types
      Keyboard Support in Mask Parts
      Mask Hints
    [Expand]Validation
    [Expand]List Editors
     Accessibility Support
   [Expand]Editor Types
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Mask Types

A mask can consist of several parts. The following part types are available:

  • Prompts

    A prompt specifier represents a single symbol. During editing, prompt specifiers are represented within the edit box using a placeholder character defined via the MaskSettings.PromptChar property.

    A, a - Alphanumeric
    L, l - Alphabetic
    C, c - Any char
    Note

    Specifiers in upper case require that a prompt should be filled. If such a prompt is left empty - the mask will not be valid.


    > - Converts all symbols to the right to upper case
    < - Converts all symbols to the right to lower case
    ~ - Cancels effect of the "<" or ">" symbol

    # - Optional digit or signum symbol
    9 - Optional digit
    0 - Required digit
  • Culture dependent separators

    Standard culture dependent separators are allowed, such as $ : / , . and etc.
  • Ranges

    The range mask type lets you define a range of allowable integer values by specifying the minimum and maximum limits. You can define a range's default value, allow zero-filling, and control whether a culture dependent thousand separator is automatically displayed. This mask type supports displaying mask hints.

    <0..100>
    <0..50..100> - With default value
    <00..100>, <01..31> - Zero-filling is enabled
    <0..9999g> - Thousand separator is added automatically (the separator is specified by the current culture)
  • Enumerations

    Using this mask type, you can define a collection of allowable string values and specify the default value, if required. This mask type supports displaying mask hints.

    <A|B|C>
    <A|*B|C> - With default value

    Use the MaskSettings.AllowEscapingInEnums property to control whether a backslash symbol (\) and quotes (single ' ' and double " ") can be used as escape characters in enumeration masks to solve the problem of using special characters inside a mask string.

  • Date-time specifiers

    Standard and custom date-time specifiers are allowed, such as 'd', 'dd MM yyyy' and so on.
  • Literals

    Literal symbols are typically used within mask expressions to group or separate different mask parts (such as parentheses in phone numbers or dashes in serial numbers, for instance) or for informative purposes. The following are considered as literals:

    - Symbols not specified above
    - A symbol preceded by a backslash '\'
    - A group of symbols wrapped with quotation marks ("$ : / , .") or apostrophes ('$ : / , .')

    Use the MaskSettings.IncludeLiterals property to control which kinds of literal symbols composing a mask should be included into an editor's value.

Expanded See Also

How would you rate this topic?​​​​​​​