Opened 11 years ago

Closed 11 years ago

#7465 closed defect (fixed)

grid autoHeight

Reported by: maulin Owned by: Nathan Toone
Priority: high Milestone: 1.2
Component: DojoX Grid Version: 1.1.1
Keywords: Cc:
Blocked By: Blocking:

Description

if grid belongs to a parent node with height=0, then setting autoHeight=true on the markup works as expected, EXCEPT that the header row is not visible (going into firebug and changing style on header to have height=33px, makes it show up.) attached is test case.

Attachments (3)

test_data_grid_autoHeightBug.html (1.7 KB) - added by maulin 11 years ago.
test_data_grid_autoHeightBug.2.html (1.7 KB) - added by maulin 11 years ago.
autoHeight bug where set to number > rowCount
_Grid.js.patch (430 bytes) - added by maulin 11 years ago.

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by maulin

comment:1 Changed 11 years ago by maulin

additionally, if you set autoHeight=number, where number is > than the number of rows returned, you also lose the header (though if number is < rowCount, it works as expected). I also attached a test case for that

Changed 11 years ago by maulin

autoHeight bug where set to number > rowCount

comment:2 Changed 11 years ago by maulin

I think I found the source: Line 587-588 of _Grid show:

Otherwise, show the header and give it an appropriate height.

this.viewsHeaderNode.style.display = "block";

but the "give it an appropritate height part is never called. I added:

Otherwise, show the header and give it an appropriate height.

this.viewsHeaderNode.style.display = "block"; this._getHeaderHeight();

and it works fine!(and yes, I have signed the CLA)

Changed 11 years ago by maulin

Attachment: _Grid.js.patch added

comment:3 Changed 11 years ago by Bryan Forbes

Owner: changed from Bryan Forbes to Nathan Toone

comment:4 Changed 11 years ago by Nathan Toone

Resolution: fixed
Status: newclosed

(In [14929]) Fixes #7465 - when changing the display of the header node, recalculate the height. Thanks for the patch !strict

Note: See TracTickets for help on using tickets.