We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

MaskEdit Syntax

Thread ID:

Created:

Updated:

Platform:

Replies:

9908 Jan 15,2004 10:43 PM Jan 25,2006 06:55 PM Windows Forms 3
loading
Tags: EditControl
Didier
Asked On January 15, 2004 10:43 PM

Hi, What is the syntax I could use in the mask property of a MaskEdit control ? I know that : # = any character (optional) 9 = any number (optional) What is the syntax for an mandatory number and mandatory character ? Is it also possible to use something like HH:mm or dd/mm/yyyy ? Thanks, Didier

Administrator [Syncfusion]
Replied On January 16, 2004 06:40 AM

Hi Didier, You could directly place the mandatory number/character itself in the Mask, and it will be displayed as it is. The MaskedEditBox does not perform automatic validation and hence we do not have specialised Mask values like HH:mm or MM/dd/yyyy. You could use Mask values like ##:## and ##/##/####, and then perform validation explicitly. I have attached a list of Mask characters that can be used below : # - Digit placeholder. . - Decimal placeholder. The actual character used is the one specified as the decimal placeholder in your international settings. This character is treated as a literal for masking purposes. , - Thousands separator. The actual character used is the one specified as the thousands separator in your international settings. This character is treated as a literal for masking purposes. : - Time separator. The actual character used is the one specified as the time separator in your international settings. This character is treated as a literal for masking purposes. / - Date separator. The actual character used is the one specified as the date separator in your international settings. This character is treated as a literal for masking purposes. \ - Treat the next character in the mask string as a literal. This allows you to include the ''#'', &, ''A'', and ''?'' characters in the mask. This character is treated as a literal for masking purposes. & - Character placeholder. Valid values for this placeholder are ANSI characters in the following ranges: 32-126 and 128-255. > - Convert all the characters that follow to uppercase. < - Convert all the characters that follow to lowercase. A - Alphanumeric character placeholder (entry required). For example: a z, A Z, or 0 9. a Alphanumeric character placeholder (entry optional). 9 - Digit placeholder (entry optional). For example: 0 9. C - Character or space placeholder (entry optional). This operates exactly like the & placeholder, and ensures compatibility with Microsoft Access. ? - Letter placeholder. For example: a z or A Z. Literal All other symbols are displayed as literals; that is, as themselves. Please refer to our class reference for more information on this. Our class reference is integrated with the VS.NET''s documentation. You could access it by StartMenu >> Programs >> MS VS.NET >> MS VS.NET Documentation. Enter "MaskedEditBox" in the ''Look for:'' field and select ''(no filter)'' option in the ''Filtered by:'' field. In future, please address your questions through Direct Trac as far as possible, since it is the fastest and best way of receiving technical support. Thanks for your cooperation. Regards, Guru Patwal Syncfusion, Inc.

David Shin
Replied On January 19, 2006 06:59 PM

How do we make a mask accept international/unicode characters?

Administrator [Syncfusion]
Replied On January 25, 2006 06:55 PM

Hi David, We regret for the delay in responding. The mask character C can be used to accept any unicode character. Special masks such as uppercasing and lowercasing will only work with the ASCII characters: I have attached sample that illustrates using the MaskedEditBox with unicode. The sample sets the font of the MaskedEditBox to be "Arial Unicode MS" Thanks, Davis

MaskedEditUnicode.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;