DropDownEdit Main Features
- 2 minutes to read
The DropDownEdit represents an editor containing an edit box to display the editor value and a specific button that opens a dropdown window whose content can be templated. The main purpose of the DropDownEdit is to allow you to define its value based upon the value(s) of another control(s) integrated into the editor’s DropDownWindowTemplate.
The image below demonstrates the DropDownEdit extension that contains the ListBox and the Button editors templated into the dropdown window.
The DropDownEdit offers the following features.
Templated Content
The dropdown window’s content can be templated (using the DropDownEditSettings.Properties.DropDownWindowTemplate (DropDownEditProperties.DropDownWindowTemplate) property).
Null Prompt Text
You can use the editor’s DropDownEditSettings.Properties.NullText (DropDownEditProperties.NullText) property to display a prompt in the editor’s edit box. The prompt text disappears when the editor receives focus.
Customizable Button Collection
The DropDownEdit extension provides a collection to maintain its custom edit buttons. Each button exposes a set of properties allowing the button’s appearance and behavior to be defined. You can use the Buttons property to populate the button collection.
Built-in Validation
The DropDownEdit extension allows you to perform data validation both on the client and server side. See the Built-in Validation topic to learn more.
Full-Featured Client-Side API
The DropDownEdit provides you with a comprehensive client-side API. This API is implemented using the JavaScript and is exposed via the ASPxClientDropDownEdit object. The ASPxClientDropDownEdit object serves as the client-side equivalent of the DropDownEdit extension.
You can operate with the editor values using the following methods.
Method Description ASPxClientDropDownEdit.GetKeyValue Obtains the key value associated with the text displayed within the editor’s edit box. ASPxClientDropDownEdit.SetKeyValue Specifies the key value associated with the text displayed within the editor’s edit box. ASPxClientDropDownEditBase.HideDropDown Closes the opened drop down window of the editor. ASPxClientDropDownEditBase.ShowDropDown Invokes the editor’s drop down window.