Opened 10 years ago
Closed 8 years ago
#11878 closed defect (patchwelcome)
doApplyCellEdit : _by_idx[inRowIndex] is undefined
Reported by: | nsharrok | Owned by: | Bryan Forbes |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | DojoX Grid | Version: | 1.5 |
Keywords: | doApplyCellEdit | Cc: | |
Blocked By: | Blocking: |
Description
I get _by_idx[inRowIndex] is undefined error in FF and IE after deleting rows on a DataGrid? that has onApplyEdit set. onApplyEdit = "updateData"
The row/s selected has a cell that is in Edit mode when the rows are deleted.
When a remaining row cell is clicked the error occurs. The inRowIndex is the idx of a deleted row.
I fixed this for my self by adding the following to DataGrid?.js doApplyCellEdit: function(inValue, inRowIndex, inAttrName){ if (typeof(this._by_idx[inRowIndex])=="undefined") return;
this.store.fetchItemByIdentity({....
The onApplyEdit callback function is called with the bad row index.
function updateData(rowIndex) {
var i = grid.getItem(rowIndex); if (i == null) return; row has already been deleted ....
This is a hack to get me out of a hole. I haven't found a way to Cancel the Edit before the deletion that worked in this instance
Change History (6)
comment:1 Changed 10 years ago by
Component: | General → DojoX Grid |
---|---|
Owner: | changed from anonymous to bryanforbes |
comment:2 Changed 10 years ago by
comment:3 Changed 10 years ago by
Owner: | changed from bryanforbes to Bryan Forbes |
---|
comment:4 Changed 10 years ago by
I've the same error with the DataGrid? without idAttribute given to the store, with given id attribute there is no error and everything works perfectly. Looks like there is a problem with generating the id when none is given to the store.
comment:5 Changed 8 years ago by
comment:6 Changed 8 years ago by
Resolution: | → patchwelcome |
---|---|
Status: | new → closed |
I have the same problem. I think I narrowed it down to _EditManager.js (as in grid.edit) still keeping the edit info object available after you delete the row. After further investigation I saw that when _View.js "rowRemoved" method is called it is internally using _EditManager.js with call to
this.grid.edit.save(this, inRowIndex);
that is supposed to remove the row from edit state if it is been removed. However in _EditManager.js the method signature is
save: function(inRowIndex, inView){ }
The parameters passed are in wrong order.