Skip to content

Replies

0
Ognyan Dimitrov
Ognyan Dimitrov answered on Jun 1, 2016 1:19 PM

The previous version has a bug. This is my latest patch which uses internally the girds own public API which does the job. Here is the modification to the _mouseDown method : 

_mouseDown: function (evt) {

if (this.isEditing()) {
// can be uncommented for blocking done/cancel buttons
//if (this.options.editMode === "cell" || !this.options.showDoneCancelButtons) {
// close editing if the end-user clicked somewhere else
// this will re-enable selection and allow for subsequent start edit which is
// at this point blocked indefinately because of the inability to select anything
if (!target.hasClass(this.css.editingCell) &&
(this.options.editMode === "cell" || this._getRowId(target.closest("tr")) !== this._editingForRowId)) {

// Here is the little modification which checks if we are in dialog mode.

if (this.options.editMode === "dialog") {
this.endEdit(false, true);
}
else {
this._endEdit(evt, true, false);
}
}
//}
}

},

0
Ognyan Dimitrov
Ognyan Dimitrov answered on May 27, 2016 2:06 PM

I have solved it this way : 

1. Uncomment some code as suggested in infragistics.lob in mouseDown event : 

_mouseDown: function (evt) {
…..
if (this.isEditing()) {
// can be uncommented for blocking done/cancel buttons
//if (this.options.editMode === "cell" || !this.options.showDoneCancelButtons) {
// close editing if the end-user clicked somewhere else
// this will re-enable selection and allow for subsequent start edit which is
// at this point blocked indefinately because of the inability to select anything
if (!target.hasClass(this.css.editingCell) &&
(this.options.editMode === "cell" || this._getRowId(target.closest("tr")) !== this._editingForRowId)) {
this._endEdit(evt, true, false);
}
//}

},

this solves the problem partially – it moves the selection properly without closing the dialog and without crashing the grid.

2. Get the igGridUpdating in any following event and call manually endEdit();

 

0
Ognyan Dimitrov
Ognyan Dimitrov answered on May 27, 2016 12:19 PM

In our case the edit dialog is displayed in different pane so the event which closes the dialog is not called and the focus is not returned back the right way. Then the whole selection functionality breaks down.

0
Ognyan Dimitrov
Ognyan Dimitrov answered on May 27, 2016 11:28 AM

The code is from igGridUpdating and it can be found in infragistics.lob.js on line 69391.

The exception happens when the edit mode is dialog and the focus is transferred to a field in the dialog because of validation.