SMART datagrid v.1 > Classes > EditOptions

Back  Forward

DataLudi.EditOptions.enterToEdit  property

如果为true,就会在输入enter键时,如果没有显示编辑器,就会在当前单元格中,显示编辑器, 而如果已有显示编辑器,就会提交编辑。 

首先,editable和列的editable都需要为true。 而且,不得通过CellStyle而将editable指定为false。 

默认值为false.

Getter
function enterToEdit(): Boolean
Setter
function setEnterToEdit(value: Boolean)
Code -1
    grid.setOptions({
        edit: {
            editable: true,
            enterToEdit: true
        }
    });
Code -2
    grid.setEditOptions({
        editable: true,
        enterToEdit: true
    });
Code -3
    grid.editOptions().setEnterToEdit(true);
See Also
editable
DataColumn.editable
CellStyle.editable
GridBase.focusedIndex
单元格编辑概述
Examples
编辑键
单元格编辑