/**
* Sets the page size, which is the number of items fetched at a time from
* the dataprovider.
* <p>
* Note: the number of items in the server-side memory can be considerably
* higher than the page size, since the component can show more than one
* page at a time.
* <p>
* Setting the pageSize after the Grid has been rendered effectively resets
* the component, and the current page(s) and sent over again.
*
* @param pageSize
* the maximum number of items sent per request. Should be
* greater than zero
*/
public void setPageSize(int pageSize) {
Usually the default page size is a good compromise. Sometimes you might want to adjust it to be larger (to fetch data less often), but a small page size is usually not going to work to your advantage, because the UI will need to load data more often to make sure there is enough scrolling buffer.