I have following webpage which is using Free jQGrid 4.15.2. Page has a fixed header and a filter area.
Question:
I need to set height of grid so
When user select row count in footer (e.g. 10) that can fit in remaining height of window, grid height change to
[rowcount selectd]*[row height]
even in last page.When user selects row count that cannot fit in the window (e.g. 100), maximum available height is selected, or in other word, grid fill available height of window so no scroll bar shown on window but grid scrollbar shown in grid row area.
This means footer need to be in screen all the time and doesn't move when user navigates in data, unless user change row count in footer.
Notes:
I can get available height of the page, height of data row, grid caption, header, footer and also row count selected in footer to set height in grid properties or
ui-jqgrid-bdiv
which both are height of data area of grid. However I would like to know if there is a more elegant way of doing this, like settingmin-height
andmax-height
instead of calculating grid height and setting it every time user selects a different row count.Setting grid height to auto, will cause height of last page of grid that normally has less rows, reduce to total rows shown thus footer will move up which is not desired.
Setting height as mentioned in this answer will only set height of inner data area of grid. I need to count in size of footer, header and title of grid too. Trying to set height of parents of
ui-jqgrid-bdiv
showing strange behaviors (taller first row, footer separated from grid, ...).User can customize size of grid font, so adding a fixed magic numbers as mentioned in this answer, will not help.