Opened 9 years ago
Closed 8 years ago
#15278 closed defect (patchwelcome)
onStartEdit() event on a non-editable cell
Reported by: | helloworld | Owned by: | Evan |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | DojoX Grid | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
One case here:
- click &change the cell value of grid(don't move mouse out of this row)
- click another cell, which is not editable, of the same row
- grid will call _editmanager.setEditCell(), then call _editmanager.start() on this cell.
Wrong result: as you know, this cell is not editable, so should not call any start() on it, right?
because this _editmanager.start() will trigger onStartEdit(), unfortunately, our project binded this onStartEdit(), so wrong things happened.
patch: I have found the suspected code below, and have a change for it. Since I am not familiar with datagrid code, could someone confirm whether any side effect for this hot patch?
dojox\grid\_EditManager.js from line#258 <raw>
setEditCell: function(inCell, inRowIndex){
summary: Set the given cell to be edited inRowIndex: Integer Grid row index inCell: Object Grid cell object if(!this.isEditCell(inRowIndex, inCell.index) && this.grid.canEdit && this.grid.canEdit(inCell, inRowIndex)){
this.start(inCell, inRowIndex, this.isEditRow(inRowIndex) inCell.editable); }
},
</raw>
for line: from <raw>
inCell.editable); |
</raw> to: <raw> this.start(inCell, inRowIndex, inCell.editable); </raw>
I just removed "this.isEditRow(inRowIndex)".
Since no matter this row is editing or not, only if this cell is editable, then click this cell will edit it; if this cell is not editable, this cell will not edit even this row is editing and click this non-editable cell. Right?
Thanks.
Change History (3)
comment:2 Changed 8 years ago by
comment:3 Changed 8 years ago by
Resolution: | → patchwelcome |
---|---|
Status: | new → closed |
Sorry, due to the format error, the original code is:
the fixed code is: