ultraDateTimeEditor1.DropDownStyle = DropDownStyle.DropDownList;
This topic introduces a new WinDateTimeEditor™ control feature that prevents users from typing directly into the control.
This topic contains the following sections:
Prior to the release of 13.1 the WinDateTimeEditor control did not have a DropDownStyle property as it existed in other drop-down controls such as UltraComboEditor™ and UltraCombo™ . Without the DropDownStyle
property, the control allowed users not only to drop down the list for selecting an item, but also allowed them to edit selections by typing directly into the control.
Now you can prevent users from typing directly into the control without impeding the selection of items from the drop-down list by simply configuring the DropDownStyle
property.
If the WinDateTimeEditor control is stand-alone, use the DropDownStyle
property of the control.
In C#:
ultraDateTimeEditor1.DropDownStyle = DropDownStyle.DropDownList;
In Visual Basic:
ultraDateTimeEditor1.DropDownStyle = DropDownStyle.DropDownList
If the WinDateTimeEditor control is embedded in the grid, configure the column that contains the embedded editor using the column’s Style
property.
In C#:
UltraGridColumn column = ultraGrid1.DisplayLayout.Bands[0].Columns["Date"];
column.Style = ColumnStyle.DropDownList;
In Visual Basic:
Dim column As UltraGridColumn = ultraGrid1.DisplayLayout.Bands(0).Columns("Date")
column.Style = ColumnStyle.DropDownList
The following topics provide additional information related to this topic.