You are right, once I changed container panel's layout to "fit", the grid height no longer affected by "items per page".
Now the grid has a fixed size, even with the "fit" layout. In order to auto resize the grid with the containing panel, I changed the onRezise handler as follows but it does not seem to make any difference. any ideas why?