#13181 closed defect (fixed)
[patch] Setting the DataGrid rowHeight attribute creates empty space between each page row.
Reported by: | dmcintyre | Owned by: | Evan |
---|---|---|---|
Priority: | high | Milestone: | 1.8.1 |
Component: | DojoX Grid | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Setting the rowHeight attribute in the DataGrid? creates a empty space between each page row in the grid. The space is caused because the top of the next page row is off by 1px time rowsPerPage. So if you have 25 rows per page you will have a 25px gap between pages. The measurePage method in _Scroller.js is adding the 1px per row. Why?
Browser: IE7 & 8 Win7 & Win2003
Steps to reproduce: Create a grid with the rowHeight and rowsPerPage settings specified. Have enough data so you will get multiple page rows in your grid.
Attachments (4)
Change History (18)
comment:1 Changed 10 years ago by
Owner: | set to evan |
---|
comment:2 Changed 10 years ago by
Owner: | changed from evan to Evan |
---|
Changed 9 years ago by
Attachment: | _Scroller.js.patch added |
---|
comment:4 Changed 9 years ago by
Component: | General → DojoX Grid |
---|---|
Summary: | Setting the DataGrid rowHeight attribute creates empty space between each page row. → [patch] Setting the DataGrid rowHeight attribute creates empty space between each page row. |
comment:5 follow-up: 6 Changed 9 years ago by
I'm hitting the same bug. Could kzyp or evans take a look at this. I don't think the + 1 was added by mistake and can't believe noone uses DataGrid? with rowHeight.
Reproduced on firefox 3.5.19, 12, 14, Chromium 18
Using tundra theme & dojo 1.5.1 (a bit outdated but code is the same)
[Edit] Soria & Claro are not affected, because of the 1px border they add dojoxGridRow => The patch will fix defect for nihilo/tundra but introduce it for others. I guess some DOM querying cannot be avoided
comment:6 Changed 9 years ago by
Replying to beuss:
I'm hitting the same bug. Could kzyp or evans take a look at this. I don't think the + 1 was added by mistake and can't believe noone uses DataGrid? with rowHeight.
Reproduced on firefox 3.5.19, 12, 14, Chromium 18
Using tundra theme & dojo 1.5.1 (a bit outdated but code is the same)
[Edit] Soria & Claro are not affected, because of the 1px border they add dojoxGridRow => The patch will fix defect for nihilo/tundra but introduce it for others. I guess some DOM querying cannot be avoided
Thanks beuss,
The rowHeight issue has been a known issue for dojox.grid for a long time, there hasn't been an ideal solution due to the machinery of the existing grid to absolutely position pages. The commonly met issue is page overlap - an explicit grid.scroller.rowHeightChanged() might help, but that brings significant rendering speed downgrade.
Just had a quick try, the _Scroller.js.patch seem not working for me("13181-evan.html") with obvious page overlaps
Any comments are welcomed.
comment:7 Changed 9 years ago by
Hi All,
I checked this example and height rows more 30px because of the text is big. And I think, better add style for dojoxGridCell:
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
But all text in cell only one line if rowHeight is't null.
Please, check my last patch.
comment:8 Changed 9 years ago by
Yes you've to add this kind of style to nodes.
I've this in my style.css:
.dojoxGrid.fixedRowHeight .dojoxGridCell { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
The fixedRowHeight (or dojoxGridFixedRowHeight) might be automatically added to the grid if rowHeight is set.
Have a look at #15810 too for filtering issues.
comment:9 Changed 9 years ago by
Please note that anthony's patch may break under claro theme and any themes for which the +1
was intended.
Changed 9 years ago by
Attachment: | 13181-evan.patch added |
---|
A patch makes rowHeight works better, though there are still remained issues in IE7 and setting an arbitrary small rowHeight will break grid
comment:10 Changed 9 years ago by
Thanks anthony/beuss,
Just post a patch that works better for me now(also with rowselector), the remained issues are:
- Not working in IE7
- Setting somehow small rowHeigth still results into page overlaps
Though not a perfect solution, the rowHeight is now working much better, we may get this in after 1.8 release freezing with a bit more tests, also add corresponding info in the grid doc page.
comment:11 Changed 9 years ago by
comment:14 Changed 8 years ago by
Milestone: | tbd → 1.8.1 |
---|
patch fix this problem