Opened 7 years ago

Closed 6 years ago

#15253 closed defect (patchwelcome)

bug of dojox.grid.cells.Select when options[] and values[] both provided

Reported by: gitawego Owned by: Evan
Priority: undecided Milestone: tbd
Component: DojoX Grid Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:


in dojox/grid/tests/test_data_grid_edit.html example, if options[] and values[] are both provided, the first time when you double click on each "Type" cell, a label value(in options[]) instead of the real value(in values[]) is passed to method formatEditing (param "inDatum"). but your method formatEditing, it's always trying to compare inDatum with the real value:

for (var i=0, o, v; ((o=this.options[i]) !== undefined)&&((v=this.values[i]) !== undefined); i++){
				v = v.replace ? v.replace(/&/g, '&amp;').replace(/</g, '&lt;') : v;
				o = o.replace ? o.replace(/&/g, '&amp;').replace(/</g, '&lt;') : o;
				h.push("<option", (inDatum==v ? ' selected' : ''), ' value="' + v + '"', ">", o, "</option>");

It causes the right option can not be selected and shown in the cell at the beginning. (if you click again on the same cell ,the method formatEditing get the real value).

Change History (2)

comment:1 Changed 6 years ago by bill

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.

comment:2 Changed 6 years ago by bill

Resolution: patchwelcome
Status: newclosed
Note: See TracTickets for help on using tickets.