JavaScript

{grid.object}populateDropdownBox Method

Syntax

{grid.Object}.populateDropdownBox(part,columnName,rowNumber,data,clearExistingData);

Arguments

part

either 'G' or 'D'

columnName

name of the column (must be uppercase)

rowNumber

row number (1 in the case of Detail View)

data

a Javascript array of the choices

clearExistingData

true or false. Existing choices are cleared out if true

Description

Populates the choices in a Dropdownbox control in the Grid or Detail View part.

Example 

Populate the choices in the Dropdown Box for the 'COMPANY' field in row 1. Add the new choices to the existing choices.

{grid.Object}.populateDropdownBox('G','COMPANY',1,['A2','B2','C2'],false);

Populate the choices in the Dropdown Box for the 'COMPANY' field in the Detail View. Replace the existing choices. Each new choice that is added has both a display and stored value.

{grid.Object}.populateDropdownBox('D','COMPANY',1,[['alpha 2','A2'],['beta 2','B2'],['display for c','C2']],true);

See Also