Opened 9 years ago

Closed 7 years ago

#12296 closed defect (patchwelcome)

dojox.grid.DataGrid if rowHeight is set, the head row is shown incorrectly.

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

Description

If the rowHeight value is set at the grid, the header row will be cut of. Problem also occurs with Version 1.6.0b2.

Attachments (2)

wrong_header.png (8.8 KB) - added by andree_ 9 years ago.
header row cuts of if rowHeight is set
dojox-12296.patch (625 bytes) - added by Sébastien Le Ray 7 years ago.
This patch should fix the issue

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by andree_

Attachment: wrong_header.png added

header row cuts of if rowHeight is set

comment:1 Changed 9 years ago by Bryan Forbes

Owner: changed from bryanforbes to Bryan Forbes

comment:2 Changed 7 years ago by Sébastien Le Ray

This is caused by the call to _ViewManager::normalizeHeaderNodeHeight() in _Grid::_getHeaderHeight.

getHeaderHeight (indirectly) delete height style property from header to get "natural" header height. normalizeHeaderNodeHeight calls normalizeRowNodeHeights which is supposed to set all the cells height to the max natural cell height of the row, except that if you give a rowHeight to your grid where this value is returned instead of the max natural height. If you max natural height is < rowHeight you end up having a viewsHeaderNode height smaller than the header cells, causing a display glitch.

Either normalizeRowNodeHeights should have a special case for header nodes which will involve a (tiny) penalty cost on every standard call or (better solution IMHO) _ViewManager::measureHeader should return this.grid.rowHeight if non-zero.

Changed 7 years ago by Sébastien Le Ray

Attachment: dojox-12296.patch added

This patch should fix the issue

comment:3 in reply to:  2 ; Changed 7 years ago by Evan

Replying to beuss:

This is caused by the call to _ViewManager::normalizeHeaderNodeHeight() in _Grid::_getHeaderHeight.

getHeaderHeight (indirectly) delete height style property from header to get "natural" header height. normalizeHeaderNodeHeight calls normalizeRowNodeHeights which is supposed to set all the cells height to the max natural cell height of the row, except that if you give a rowHeight to your grid where this value is returned instead of the max natural height. If you max natural height is < rowHeight you end up having a viewsHeaderNode height smaller than the header cells, causing a display glitch.

Either normalizeRowNodeHeights should have a special case for header nodes which will involve a (tiny) penalty cost on every standard call or (better solution IMHO) _ViewManager::measureHeader should return this.grid.rowHeight if non-zero.

Not seeing this issue in a similar 13181 test case with v 1.8 Is there a test case to reproduce/verify?

comment:4 in reply to:  3 Changed 7 years ago by Evan

Replying to Evan:

Replying to beuss:

This is caused by the call to _ViewManager::normalizeHeaderNodeHeight() in _Grid::_getHeaderHeight.

getHeaderHeight (indirectly) delete height style property from header to get "natural" header height. normalizeHeaderNodeHeight calls normalizeRowNodeHeights which is supposed to set all the cells height to the max natural cell height of the row, except that if you give a rowHeight to your grid where this value is returned instead of the max natural height. If you max natural height is < rowHeight you end up having a viewsHeaderNode height smaller than the header cells, causing a display glitch.

Either normalizeRowNodeHeights should have a special case for header nodes which will involve a (tiny) penalty cost on every standard call or (better solution IMHO) _ViewManager::measureHeader should return this.grid.rowHeight if non-zero.

Not seeing this issue in a similar 13181 test case with v 1.8 Is there a test case to reproduce/verify?

OK, so seems this issue only occurs in non-claro themes

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

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