The EditMask property of the C1DataColumn object is used to specify an input mask template for end-user data entry. The input mask string is composed of special characters that represent either an input character that the user must enter, or a literal character that will be skipped over on input. Valid template characters are as follows:
The EditMask must be a string composed of the following symbols:
1. Wildcards
0 digit
9 digit or space
# digit or sign
L letter
? letter or space
A letter or digit
a letter, digit, or space
& any character
2. Localized characters
. localized decimal separator
, localized thousand separator
: localized time separator
/ localized date separator
3. Command characters
\ next character is taken as a literal
> translate letters to uppercase
< translate letters to lowercase
For example:
' Set the mask so the user can enter a phone number, with optional area code, and a state in capitals.
Me.C1TrueDBGrid1.Columns(0).EditMask = "(###) 000-0000 St\ate\: >LL"
· C#
// Set the mask so the user can enter a phone number, with optional area code, and a state in capitals.
this.C1TrueDBGrid1.Columns(0).EditMask = "(###) 000-0000 St\ate\: >LL";
· Delphi
// Set the mask so the user can enter a phone number, with optional area code, and a state in capitals.
Self.C1TrueDBGrid1.Columns[0].EditMask := '(###) 000-0000 St\ate\: >LL';
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |