Opened 10 years ago
Closed 9 years ago
#15752 closed defect (patchwelcome)
DataGrid.js unreachable code
Reported by: | bill | Owned by: | Evan |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | DojoX Grid | Version: | 1.7.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Final return statement never fires:
get: function(inRowIndex, inItem){ // summary: // Default data getter. // description: // Provides data to display in a grid cell. Called in grid cell context. // So this.cell.index is the column index. // inRowIndex: Integer // Row for which to provide data // returns: // Data to display for a given grid cell. if(inItem && this.field == "_item" && !this.fields){ return inItem; }else if(inItem && this.fields){ var ret = []; var s = this.grid.store; array.forEach(this.fields, function(f){ ret = ret.concat(s.getValues(inItem, f)); }); return ret; }else if(!inItem && typeof inRowIndex === "string"){ return this.inherited(arguments); } return (!inItem ? this.defaultValue : (!this.field ? this.value : (this.field == "_item" ? inItem : this.grid.store.getValue(inItem, this.field)))); },
Change History (2)
comment:1 Changed 9 years ago by
comment:2 Changed 9 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.