SMART datagrid v.1 > Classes > DataColumn

Back  Forward

DataLudi.DataColumn.editor  property

Editor information which will be used when editing data cell involved in this column. 

You can specify only editor type by string, or specify editor properties together with the type at the same time by JSON object. It returns the type of editor which has been set as string. If do not specify, it will be set as LineCellEditor

When the user starts editing based on editor information set by this property, the grid will prepare cell editor. In other words, you do not need to directly create editor object like LineCellEditor, etc. In the table below, it has listed the types of editor which can be used now. 

When change the setting after initial setting of column editor, you can call this property setter again. If specify the property value of setting object which is transferred to Setter as undefined, it will return the default value by removing the existing value. In addition, the copy of setting object is stored internally, and you can get it by editorOptions

Defaults to null.

Getter
function editor(): String
Setter
function setEditor(value: String|Object)
Table-1  Data Cell Editors
Setting typeEditor classExplanation
'line'LineCellEditorCan input the text of single line. If do not explicitly specify when setting editor, this editor will be used.
'multiline'MultiLineCellEditorCan input the text of multiple lines.
'list'ListCellEditorEditor which enables selection by displaying the prespecified items in list box.
'number'NumberCellEditorEditor which accepts the input of numeric value.
'date'DateCellEditorEditor which accepts the input of date value. It will display calendar box.
'search'SearchCellEditorDropdown editor which updates the item of list box depending on the value entered by user.
Code -1
    // If transfer by text, it will read it as editor type.
    column.setEditor("multiline");
    
    // In most cases, it will specify as setting object.
    column.setEditor({
        type: "dropDown",
        maxLength: 10,
        readOnly: undefined // If specify as undefined, it will clear the value.
    });
See Also
Cell Editing Overview
editable
readOnly
editorOptions
CellEditor
Examples
Cell Editing