SMART datagrid v.1 > Classes

Back  Forward

DataLudi.SearchCellEditor  class

通过触发GridBase.onEditSearch事件,获取将会显示在列表框的项目。 当最后进行输入之后,经过searchDelay,并且所输入的文本长度大于keyLength,就会触发事件。 而且,如果requestCtrlEntertrue,就会无关searchDealy,当输入ctrl+enter键时,将会触发事件。 如果requestEntertrue,当输入enter键时,将会触发事件。 

在事件处理器中,通过GridBase.fillEditSearchItems函数,向编辑器传递列表项目。 

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

 

Code -1
    var columns = [{
        name: "CustomerID",
        fieldName: "CustomerID",
        editor: {
            type: "search",
            keyLength: 1,
            searchDelay: 500,
            requestWhenCtrlEnter: false,
            requestWhenEnter: false,
            dropDownWidth: -1
        },
        styles: {
            textAlignment: "center"
        },
        header: {
            text: "Search Editor ",
            styles: {
                background: "linear,#22ffd500,#ffffd500,90"
            }
        }
    },
    ...
    }];
    grid.setColumns(columns);
See Also
GridBase.onEditSearch
GridBase.fillEditSearchItems
Examples
搜索单元格编辑器