Opened 12 years ago

Closed 11 years ago

#11330 closed defect (invalid)

dojox.grid.DataGrid inheritance problem

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


Inheritance problem :

dojo.provide( "myDataGrid" ); dojo.declare( "myDataGrid",

[dojox.grid.DataGrid?], { }


While using "dojox.grid.DataGrid?" the grid is displayed just fine when I use "myDataGrid" only some of grid components gets rendered (only some divs exists) but the grid remains blank including the data from store and no error is generated.

So by declarring this :

<table dojoType="myDataGrid"

clientSort="true" style="float:left;margin:0; width:90%;" id="suppliers" selectionMode="multiple" rowsPerPage="10" >

<thead> <tr> <th width="100%" field="title">Name</th> <tr> </thead> </table>

the widget gets parsed and result only this instead of a complete grid:

<div dojoattachevent="onmouseout:_mouseOut" wairole="grid" hidefocus="hidefocus" class="dojoxGrid" role="grid" tabindex="0" aria-multiselectable="true" id="suppliers" style="float: left; margin: 0pt; width: 90%;" widgetid="suppliers" aria-readonly="true">

<div wairole="presentation" dojoattachpoint="viewsHeaderNode" class="dojoxGridMasterHeader" role="presentation"></div> <div wairole="presentation" dojoattachpoint="viewsNode" class="dojoxGridMasterView" role="presentation"></div> <div dojoattachpoint="messagesNode" style="display: none;" class="dojoxGridMasterMessages"></div> <span tabindex="0" dojoattachpoint="lastFocusNode"></span>


Change History (3)

comment:1 Changed 12 years ago by bill

Owner: changed from bryanforbes to Bryan Forbes

comment:2 Changed 11 years ago by evan

Seems to be an invalid defect, 'store' and 'structure' are missed in the markup of 'myDataGrid'.

Need to close this.

comment:3 Changed 11 years ago by evan

Resolution: invalid
Status: newclosed

'store' and 'structure' are missed in the test case, also a height style is required for Grid.

When inheriting DataGrid?, you may also need to add your own markupFactory(), e.g.

myDataGrid.markupFactory = function(props, node, ctor, cellFunc){
    return dojox.grid.DataGrid.markupFactory(props, node, ctor,[[BR]]
	dojo.partial(dojox.grid.DataGrid.cell_markupFactory, cellFunc));
Note: See TracTickets for help on using tickets.