SMART datagrid module provides two cell editors such as LineCellEditor and MultiLineCellEditor. Cell editor is set through DataColumn.editor property. You can simply set the editor type with texts, or transfer the editor properties together with the editor type. Please refer to editor help topic.
LineCellEditor is an editor which can input a line of text. When set DataColumn.editor, if specify the type as "line" or do not specify at all, this editor will be used. Editing will be completed when type enter key and cancelled when type esc key. You can specify the maximum length that can be entered through maxLength.
The maximum length of the editor in the selected column.
And, you can also specify the input case through textCase.
If textCase of the editor is default, it will follow column textInputCase.
MultiLineCellEditor is an editor which can input multiple lines of text. The type is specified as "multiline" when set DataColumn.editor.
column.setEditor({
type: "multiline",
maxLength: 200
});
column.setStyles({
textWrap: DataLudi.TextWrap.EXPLICIT
});
If type shift+enter key, the line will be divided. Editing will be completed when type enter key and cancelled when type esc key.
It has the same properties as LineCellEditor. In the example below, "Product name" column has been set by this editor. But be warned, the line will be divided only if set textWrap style value of the column as TextWrap.NORMAL or EXPLICIT.