SMART datagrid v.1 > Classes > DataColumn
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.
Setting type | Editor class | Explanation |
---|---|---|
'line' | LineCellEditor | Can input the text of single line. If do not explicitly specify when setting editor, this editor will be used. |
'multiline' | MultiLineCellEditor | Can input the text of multiple lines. |
'list' | ListCellEditor | Editor which enables selection by displaying the prespecified items in list box. |
'number' | NumberCellEditor | Editor which accepts the input of numeric value. |
'date' | DateCellEditor | Editor which accepts the input of date value. It will display calendar box. |
'search' | SearchCellEditor | Dropdown editor which updates the item of list box depending on the value entered by user. |
// 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.
});