Not coming out of inline editing in Dojo DataGrid

2019-06-14 15:09发布

问题:

Possible Duplicate:
Dojo IE DataGrid inline editing

The cells in the grid in the following jsfiddle are editable but I am :

not able to come out of the edit mode when I double click on the cell, change the value, click outside the grid.

able to come out of the edit mode when I double click on the cell, change the value, click inside the grid.

jsfiddle: http://jsfiddle.net/keemor/xDUpp/11/

Can some please fix that jsfidddle for me.

回答1:

Ok I've found the fix. It seems like it works perfectly. You need to register for the onBlur event of the grid and manually call save on your grid.

vGrid.onBlur = function(){
    var grid = dijit.byId('validation_grid');
    if (grid.edit.isEditing()){
        grid.edit.apply();
    }
};