Settings that affect the appearance and behavior of columns with the EditMask edit style.
Column controls
DataWindow .NET dot notation:
(( EditMask) colname.EditStyle).property [C#] CType(colname.EditStyle, EditMask).property [Visual Basic]
Describe and Modify argument:
"columnname.EditMask.property { = value }"
Parameter |
Description |
---|---|
columnname |
The column with the EditMask edit style for which you want to get or set property values. You can specify the column name or a pound sign (#) and the column number. |
property |
A property for the column’s EditMask style. Properties and their settings are listed in the table below. |
value |
The value to be assigned to the property. For EditMask properties, you cannot specify a DataWindow expression. |
Property for EditMask |
Value |
---|---|
AutoSkip |
Whether the EditMask will automatically skip to the next field when the maximum number of characters has been entered. Values are:
|
CodeTable |
Whether the column has a code table. Values are:
|
DDCalendar |
Whether a drop-down calendar control displays when a user clicks in a column with a Date or DateTime edit mask. Values are:
For Web DataWindows, to make sure that dates selected with the drop-down calendar option are displayed with the desired edit mask, you should specify that the Client Formatting option be included with the static JavaScript generated and deployed for the DataWindow. To conserve bandwidth, JavaScript for client formatting is not included by default. If you do not include script for client formatting, the drop-down calendar will use a default edit mask to display the column data based on the client machine's default localization settings. |
DDCal_AlignRight |
Whether the drop-down calendar is aligned with the right side of the column. Values are:
|
DDCal_BackColor |
The background color of the drop-down calendar. The default is Window Background. |
DDCal_TextColor |
The color of text in the drop-down calendar. The default is Window Text. |
DDCal_TitleBackColor |
The background color of the title in the drop-down calendar. The default is Highlight. |
DDCal_TitleTextColor |
The color of text in the title of the drop-down calendar. The default is Highlight Text. |
DDCal_TrailingTextColor |
The color of trailing text (days in the previous and next months) in the drop-down calendar. The default is Disabled Text. |
FocusRectangle |
Whether a dotted rectangle (the focus rectangle) will surround the current row of the column when the column has focus. Values are:
|
Mask |
A string containing the edit mask for the column. |
ReadOnly |
Whether the column is read-only. This property is valid only if EditMask.Spin is set to Yes. Values are:
|
Required |
Whether the column is required. Values are:
|
Spin |
Whether the user can scroll through a list of possible values for the column with a spin control. Values are:
This setting has no effect in Web DataWindows. |
SpinIncr |
An integer indicating the amount to increment the spin control’s values. The default for numeric values is 1; for dates, 1 year; and for time, 1 minute. Available for numeric, date, and time columns. For columns that are not numeric, date, or time, the spin control scrolls through values in an associated code table. If the EditMask.CodeTable property is No, the spin increment has no effect for these columns. |
SpinRange |
A string containing the maximum and minimum values for the column that will display in the spin control. The two values are separated by a tilde (~). This property is effective only if EditMaskSpin is True. Available for numeric, date, and time columns. Because the SpinRange string is within another quoted string, the tilde separator becomes four tildes in DataWindow .NET, which reduces to a single tilde when parsed. The format for the string is: "EditMask.SpinRange = ' minval~~~~maxval ' "
|
UseEllipsis |
Whether an ellipsis (three dots) displays when a column with the EditMask edit style contains character data that is too long for the display column in the DataWindow. The ellipsis does not display when the column has focus. Values are:
The property is ignored if you:
The UseEllipsis DataWindow object property is not supported in Web Forms applications. |
UseFormat |
Whether a Format Display mask is used for a column’s display. A Format Display mask is used only when the column does not have focus. Values are:
|
Select the control and set values in the Properties window, Behavior category, when Style is EditMask.
In DataWindow .NET, you can use the EditMask class to set EditMask style properties using dot notation. See the description of the EditMask class in the online Help in Visual Studio .NET for a complete list of properties. Some properties have different names and are set differently. For example, spin values are set differently.
[Visual Basic] setting = dw1.Describe("emp_status.EditMask.Spin")
dw1.Modify("empBonus.EditMask.SpinIncr=1000")
dw1.Modify("empBonus.EditMask.SpinRange='0~~~~5000'")
[Visual Basic] If TypeOf strtdt.EditStyle Is EditMask Then CType(strtdt.EditStyle, EditMask).Mask = _ "yyyy-mm-dd" CType(strtdt.EditStyle, EditMask).Spin.Minimum _ = "100" CType(strtdt.EditStyle, EditMask).Spin.Maximum _ = "10000" CType(strtdt.EditStyle, EditMask).Spin.Increment _ = 10 ElseIf ...
[C#] if (strtdt.EditStyle is EditMask) { ((EditMask)strtdt.EditStyle).Mask = "yyyy-mm-dd"; } else ....
dw1.Modify("col1.EditMask.UseEllipsis=Yes")