Table pagination

Hi

I am creating a GroupTable programatically and all works well. However I have a problem that the paging does not display and therefore the only data available in the table is the same as the ‘show rows’ option of the associated filter component.

For testing purposes, I have created a separate table which has been added through the design gui layout and ticked the ‘rowscount’ checkbox and this functionality appears to have the desired effect. My question is how do you set the equivalent ‘rowscount’ checkbox from a programatically created table? There is a table.setrowscount function but I am completely stumped on how to get the required ‘RowsCount’ parameter needed to use this function.

Any help or advice would be greatly appreciated.

Thanks
David

ok. I’ve managed to get a little further and can now show the pagination using the following code:

RowsCount rowsCount = componentsFactory.createComponent(RowsCount.class);
rowsCount.setDatasource(test1ds);
rowsCount.setOwner(table);
table.setRowsCount(rowsCount);

For my own sanity, it would be good to know if this is the correct way of achieving this so any feedback welcomed.

I’ve also noticed that the row count is displayed however the total number of records is displayed as a ‘?’ which changes when you click on it to the correct number of records. Is there any reason for this and is there a solution to display the total number of records by default rather than having to click on the ‘?’.

Thanks in advance.

David