DropdownValue Object Class

This object represents a single name/value pair for use in a DropDown and similar controls.

Properties

PROPERTY NAME

DATA TYPE

DESCRIPTION

Text

String

The text to display for the DropDown entry

Value

String

The actual value to use when using the DropDown entry

Methods

Constructor

Parameters

Text: The text to display for the DropDown entry

Value (Optional): The actual value to use when using the DropDown entry. If the constructor doesn't receive this parameter, it will use the 'Text' parameter for the Value as well.

Example

// Create a value with Text:"[Select a Value]" and Value:""
var ddv1 = new DropDownValue("[Select a Value]", "");

// Creates a value with Text:"Item1" and Value:"Item1"
var ddv2 = new DropDownValue("Item1");

// Creates the same DropDownValue as above ("Item1"/"Item1")
var ddv3 = new DropDownValue("Item1", "Item1");