SMART datagrid v.1 > Classes
DataLudi.ListCellEditor class
显示包含可选项目的列表框的文本编辑器。
当用户输入值时,最靠近所输入的值的列表项目将会被选,而如果用鼠标点击这个项目或输入enter键,编辑器的内容就会被变更为相关项目的值。 这时,如果commitOnSelect为true,数据单元格的值就会被变更为所选值。
通过values,指定将会被显示在列表的项目。 如果在labels中,指定相当于values的项目,labels的项目将会替代values而显示在列表。 这时,实际适用于数据单元格的值,将会是设置在values的值中的一个。
如果readOnly为true,就无法展开列表框。
当设置列editor时,将会把type指定为"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
- 列表单元格编辑器