Opened 9 years ago

Closed 7 years ago

#12248 closed defect (patchwelcome)

Select cell in DataGrid does not support one item.

Reported by: soularis999 Owned by: Bryan Forbes
Priority: high Milestone: tbd
Component: DojoX Grid Version: 1.4.3
Keywords: Cc:
Blocked By: Blocking:

Description

I created a grid layout in HTML markup and added one column that should display dropdowns.

<th field="type" editable="true" cellType="dojox.grid.cells.Select" options="TEST" width="50px">Test</th>

On edit there is a javascript error that shows up that basically states that there are no items to iterate. I narrowed it down to

dojox.grid.cells.Select.markupFactory where after parsing the options fiels the method basically checks if there are more that one item and if not it never assignes the options to the cell holder.

Change History (5)

comment:1 Changed 9 years ago by soularis999

I put a temp fix in my code that does work:

var func = dojox.grid.cells.Select.markupFactory; dojox.grid.cells.Select.markupFactory = function(node, cell) {

func(node, cell) if(null != cell.options) {

return;

}

var options = dojo.trim(dojo.attr(node, "options")
"");

if(options){

cell.options = [options];

}

}

comment:2 Changed 9 years ago by bill

Component: GeneralDojoX Grid
Owner: changed from anonymous to bryanforbes

comment:3 Changed 9 years ago by Bryan Forbes

Owner: changed from bryanforbes to Bryan Forbes

comment:4 Changed 7 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:5 Changed 7 years ago by bill

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