RealGrid2 API
Interface
DropDownCellEditor

DropDownCellEditor

Editor that can be modified as a list (dropdown editor)

Signature:

export interface DropDownCellEditor extends TextCellEditor

Extends: TextCellEditor

Remarks

Select and edit one value from the list specified by the values property of the dropdown editor.

You can specify texts to be displayed in the dropdown list instead of values in labels.

Inherits TextCellEditor.

[Superclass]

CellEditor - TextCellEditor

[subclass]

SearchCellEditor

MultiCheckCellEditor

Example

//string type
column.editor = "list"
 
// object type
column.editor = {
      type: "list",
      values: ["VINET", "TOMSP", "VICTE"],
      labels: ['label1', 'label2', 'label3'],
      displayLabels: "valueLabel",
      textReadOnly: true
}

Properties

PropertyTypeDescription
caseSensitivebooleanCase sensitive when entering keys
commitOnSelectbooleanWhether to commit when selecting a list
displayLabelsDropDownValueLabelHow to display the label
domainOnlybooleanWhether only values in the list can be specified
dropDownCountnumberNumber of list items
dropDownPositionDropDownPositionPosition of list selection box
dropDownWhenClickbooleanWhether to expand the list when a cell is clicked
dropDownWhenEnterbooleanWhether to expand the list when enterKey is entered
dropDownWidthnumberWidth of list selection box
itemColumnedbooleandisplayLabels has the property DropDownValueLabel.VALUE_LABEL, [DropDownValueLabel.LABEL_VALUE](/refs/realgrid# dropdownvaluelabel), whether to automatically adjust the margin between two values and then sort them
itemSortStyleDropDownSortStyleHow the list is sorted
labelsany[]Display values in list
listCallbackListCallbackCallback called when the dropdown button is clicked
partialMatchbooleanWhether to move to the corresponding value when entering Korean initial consonants
separatorstringdisplayLabels has the property DropDownValueLabel.VALUE_LABEL, [DropDownValueLabel.LABEL_VALUE](/refs/realgrid# dropdownvaluelabel), a separator between two values
templateCallbackListTemplateCallbackCallback called when dropdownList is displayed
textReadOnlybooleanWhether to prohibit input using the keyboard
trimLabelTextbooleanWhether to trim the text in the list
type'dropdown' | 'list'Cell editor type: dropdown
valuesany[]Actual values in list

Properties Desc

caseSensitive

Case sensitivity when entering keys

Type - boolean


commitOnSelect

Whether to commit when selecting the list

Type - boolean


displayLabels

How to show the label

Type - DropDownValueLabel


domainOnly

Whether only values in the list can be specified

Type - boolean

Remarks:

When set to true, values other than the list cannot be specified.


dropDownCount

Number of list items

Type - number


dropDownPosition

Location of the list selection box

Type - DropDownPosition


dropDownWhenClick

Whether to expand the list when a cell is clicked

Type - boolean


dropDownWhenEnter

Whether to expand the list when enterKey is entered

Type - boolean


dropDownWidth

Width of list selection box

Type - number


itemColumn

displayLabels has the property DropDownValueLabel.VALUE_LABEL, [DropDownValueLabel.LABEL_VALUE](/refs/realgrid# dropdownvaluelabel), whether to automatically adjust the margin between two values and then sort them.

Type - boolean


itemSortStyle

How the list is sorted

Type - DropDownSortStyle


labels

Display values in list

Type - any[]


listCallback

Callback called when the dropdown button is clicked

Type - ListCallback

Remarks:

Used to dynamically create the list displayed in dropdownList.


partialMatch

Whether to move to the corresponding value when entering Korean initial consonants

Type - boolean


separator

displayLabels has the property DropDownValueLabel.VALUE_LABEL, [DropDownValueLabel.LABEL_VALUE](/refs/realgrid# dropdownvaluelabel), a separator between two values.

Type - string


templateCallback

Callback called when dropdownList is displayed

Type - ListTemplateCallback

Remarks:

Used when the user directly writes the content displayed in the dropdownList.


textReadOnly

Whether input using the keyboard is prohibited

Type - boolean


trimLabelText

Whether to trim the text in the list

Type - boolean


type

Cell editor type: dropdown

Type - 'dropdown' | 'list'

Remarks:

If you want to specify it as a basic drop-down editor rather than an extended model such as SearchCellEditor, enter 'list' or 'dropdown'.


values

actual values in list

Type - any[]