SMART datagrid v.1 > Classes > EditOptions

Back  Forward

DataLudi.EditOptions.insertByCell  property

如果为true,就会在添加行中,结束个别数据单元格输入时,将会提交行编辑。 

基本上,网格为单位,提交或取消用户输入。 可以通过输入同一行的多个单元格,并且通过方向键或鼠标而试图行移动,提交行编辑,或通过输入Esc键,取消所有行的输入。 可以通过调用GridBase.commitGridBase.cancel,分别进行提交或取消。 但是,如果这个属性被指定为true,就会在输入Enter键或移动到其他单元格并提交数据单元格输入时,将会一同提交行编辑。 

为了在修改行中,以单元格为单位进行提交,需要将updateByCell指定为true。 

默认值为false.

Getter
function insertByCell(): Boolean
Setter
function setInsertByCell(value: Boolean)
Code -1
    grid.setOptions({
        edit: {
            insertable: true,
            insertByCell: true
        }
    });
Code -2
    grid.setEditOptions({
        insertable: true,
        insertByCell: true
    });
Code -3
    grid.editOptions().setInsertByCell(true);
See Also
updateByCell
GridBase.commit
GridBase.cancel
insertable
appendable
Examples
编辑
撤销和重做