Opened 8 years ago

Closed 6 years ago

#13908 closed defect (patchwelcome)

DataGrid doesn't render composite widgets when adding new items to its store

Reported by: antonmiakotin Owned by: Evan
Priority: high Milestone: tbd
Component: DojoX Grid Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:

Description

I have a custom widget that contains other widgets inside of it. When adding this widget programmatically to dojox.grid.DataGrid?'s store, the first one is displayed correctly, with inner widgets showing, however any subsequent add to the store removes the inner widgets from the rows that are already displayed, only displaying the last added widget correctly.

Here's an example 'composite' widget:

dojo.provide("custom.ContentWidget.ContentWidget");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.form.Button");
dojo.declare("custom.ContentWidget.ContentWidget",
		[dijit.layout.ContentPane],{

	startup: function(){
		this.inherited(arguments);
		this.set('content', new dijit.form.Button({label: "Cool"}));
		}
});

When adding several of this widget to the store that drives a DataGrid?, only the last widget is displayed correctly, all other ones don't show the inner button.

Attachments (1)

DataGrid composite widget bug.png (86.3 KB) - added by antonmiakotin 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by antonmiakotin

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.