Version

Preventing From Typing Into WinDateTimeEditor

Topic Overview

Purpose

This topic introduces a new WinDateTimeEditor™ control feature that prevents users from typing directly into the control.

In this topic

This topic contains the following sections:

Configuring the DropDownStyle Property

Introduction

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.

Property settings

Note
Note:

By default, the control allows typing into it directly. Take the following two scenarios into consideration when configuring the control to prevent the users from typing directly into the control’s editor.

  1. 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
  1. 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

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

In this section, you will find short, task-based topics that explain how to perform a specific task related to the WinDateTimeEditor component.