Opened 11 years ago
Closed 8 years ago
#9998 closed defect (patchwelcome)
DataGrid when after cell edit enter pressed fires onClickEvent with undefined rowIndex
Reported by: | Marcin Gołębski | Owned by: | Bryan Forbes |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | DojoX Grid | Version: | 1.3.2 |
Keywords: | DataGrid edit | Cc: | |
Blocked By: | Blocking: |
Description
Scenario:
- DataGrid?, one text cell in edition state.
- press Enter
- _Events.onKeyDown fires and the following part of this function doesn't work properly:
if (!this.edit.isEditing()){ var curView = this.focus.focusView || this.views.views[0]; //if no focusView than only one view curView.content.decorateEvent(e); this.onRowClick(e);
eg. curView.content.decorateEvent(e); doesn't set e.rowIndex.
I we change this block to the following:
if (!this.edit.isEditing()){ var curView = this.focus.focusView || this.views.views[0]; //if no focusView than only one view curView.content.decorateEvent(e); if(!e.rowIndex) { e.rowIndex = this.focus.rowIndex; } this.onRowClick(e);
it works fine. Obviously this is not a solution.
I don't know if it is helpful but I found thad the method _Builder.findTarget:
findTarget: function(inSource, inTag){ var n = inSource; while(n && (n!=this.domNode) && (!(inTag in n) || (gridViewTag in n && n[gridViewTag] != this.view.id))){ n = n.parentNode; } return (n != this.domNode) ? n : null; },
has this.domNode == undefined during curView.content.decorateEvent(e); call.
Change History (2)
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
Resolution: | → patchwelcome |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
DojoX Grid and EnhancedGrid are deprecated in favor of dgrid and gridx.
You should upgrade your code to use one of those two grids.
We will consider patches to the old DojoX Grid code though.