Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.3

Bug #4527 allowEmptyRows adds one row too much
Submitted: 2005-06-04 19:55 UTC
From: wiesemann Assigned: asnagy
Status: Closed Package: Structures_DataGrid
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    

 [2005-06-04 19:55 UTC] wiesemann
Description: ------------ If I use HTMLRenderer (CVS version) with $dg->renderer->allowEmptyRows(true), if I have a row limit of 20 and if have 19 records I get two blank rows printed (21 total). That's also the case when I have less than 19 records. If there are 20 records, the problem does not occur. Bugfix: move line 459 ($rowCnt++;) after the for loop in the next line The problem occurs also in my patched version of HTMLTable.php when not using a footer. If one uses a footer the last (wrong) row is overridden. So the change suggested above needs to be there also (but with $this->_rowCnt++;). Reproduce code: --------------- You can see the problem if you change line 463f. (CVS) from $this->_table->setCellContents($rowCnt, $j, ' '); to: $this->_table->setCellContents($rowCnt, $j, 'x'); Result: There will be row with " " (default for empty cells) in the cells before the rows with 'x'. After the code change described above it will correctly start with 'x' in the cells after the last row with data.


 [2005-07-13 16:06 UTC] asnagy
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on In case this was a website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.