PDA

View Full Version : Dynamic number of retured rows on one page



spandor
30 Jan 2011, 7:38 AM
Hi Guys!

I was looking for some tips but I couldn't find anything. Maybe someone here will be able to verify my idea.
Is it generally posible to change a number of displayed rows in datagrid accordingly to the height of the table? When I change height of table I have more/less rows and number of pages changes dynamically as well?

ryanyoungsma
30 Jan 2011, 4:43 PM
It's certainly possible to a relative extent. Meaning if you are trying to fill up exactly the inner grid height with the precise amount of rows, well that gets complicated. If you want it close you just need to get the grid panel height (maybe grid.getBox()) after it renders, calc the amount of rows you want based on this height, assign the amount of rows to the baseParams of the store, then load (or reload) the store.