Feature #5223


WTableView: Set maximum amount of rendered rows instead of height

Added by David Gaarenstroom over 7 years ago. Updated about 7 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


I would like to be able to set the maximum number of rendered rows in WTableView without having to do this by setting the WLength height of the WTableView. I would love to have something like "WTableView::setMaxRenderedRows(int rowCount)" added.

Currently I am trying to use a WTableView in a Bootstrap-based (CSS based) layout, however I noticed the only way to control the number of displayed rows in a WTableView is to use WTableView::setHeight. Unfortunately in that case:

  • either the table has too few records and a the height setting is too large, creating a large white space between the existing rows and the (unused) navigation buttons,
  • or the table has more records than it could possibly show. in that case a certain number of rows is shown. (at least) Without a layout manager the number of rows to render is incorrectly calculated and therefore a vertical scroll bar is shown for the table.

And if I don't set the height of the WTableView, the table will render every row of the table, instead of showing navigation buttons. This is problematic for tables with > 1000 records.

I would like be able to set the maximum numbers of rows to render, for example 25, 50, 100 or 250 rows.

(Right now, relevant methods in WTableView are non-virtual, so I cannot easily sub-class it either. Otherwise I'd at least override "WTableView::computeRenderedArea")

Actions #1

Updated by Aaron Wright about 7 years ago


This would be very useful.


Also available in: Atom PDF