var grid = new ej.grids.Grid({
...
editSettings: { ... mode: 'Inline' },
....
beginEdit: function(args) {
args.row.classList.add('e-dlgeditrow')
}
});
var dbClick = false;
grid.on('dblclick', function() { dbClick = true; });
grid.appendTo('#Grid');
var dialogRenderer = new grid.editModule.renderer.editType.Dialog(grid, grid.serviceLocator);
grid.editModule.renderer = ej.base.extend(grid.editModule.renderer, {
update: function(args) {
if (dbClick) {
dbClick = false;
dialogRenderer.update(this.getEditElements(args), args);
this.parent.setProperties({
editSettings: { mode: 'Dialog'}
}, true);
} else {
this.renderer.update(this.getEditElements(args), args);
this.parent.setProperties({
editSettings: { mode: 'Normal' }
}, true);
}
this.convertWidget(args);
}
});
|