SMART datagrid v.1 > Classes

Back  Forward

DataLudi.ListCellEditor  class

The text editor which displays list box in which displays selectable items. 

When the user is entering values, the list item which is nearest entered value will be selected, and if click this item with mouse or type enter key, the contents of editor will be changed as the value of this item. At this point, if commitOnSelect is true, the value of data cell will be changed as the selected value. 

You can specify the items which will be displayed in the list by values. If specify the item as much as values in labels, the items of labels instead of values will be displayed in the list. In this case, the value which is actually applied in data cell will also be one of the values which are set in values

If readOnly is true, you will not be able to expand list box. 

When setting column editor, type will be specified as "list"

Base Classes
TextCellEditor > CellEditor > EventAware > DLBase
Inherited Classes
SearchCellEditor
Constructor
function ListCellEditor (grid: GridBase, parentElement: HtmlElement);
Properties
caseSensitive
commitOnSelect
domainOnly
dropDownCount
dropDownPosition
dropDownWidth
insideSearch
isListing
itemsCallback
itemSortStyle
labels
listing
listItemColumned
listItemDisplay
listItemGap
listItemSeparator
listItemStyles
narrowSearch
partialMatch
subItemStyles
textReadOnly
values
Inherited Properties
CellEditor.booleanFormat
CellEditor.datetimeFormat
CellEditor.emptyValue
CellEditor.fontName
CellEditor.fontSize
CellEditor.keyCallback
TextCellEditor.maxLength
TextCellEditor.minLength
TextCellEditor.noHangul
TextCellEditor.text
CellEditor.textCase
Inherited Methods
EventAware.addListener
DLBase.assign
CellEditor.ctor
TextCellEditor.ctor
DLBase.getProperties
DLBase.getProperty
EventAware.removeListener
DLBase.setProperties
DLBase.setProperty
DLBase.toggle

 

Code -1
    var columns = [{
            name: "CustomerID",
            fieldName: "CustomerID",
            width: "120",
            editor: {
                type: "list",
                dropDownCount: 4,
                dropDownWidth: 0,
                domainOnly: true,
                values: ["VN", "HN", "SP", "VC", "TR", "SV"],
                labels: ["VINET", "HANAR", "SUPRD", "VICTE", "THREE", "SEVEN"]
            }
        }, 
        ...
    ];
    grid.setColumns(column);
See Also
LineCellEditor
DateCellEditor
Examples
List Cell Editor