Author Topic: Setting Height after initialisation  (Read 4143 times)

RedBully

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 51
    • View Profile
Setting Height after initialisation
« on: May 06, 2015, 03:10:11 pm »
Please can you confirm how to change the height of the grid after initialisation.

I have tried using
Code: [Select]
$("#grid_filter").pqGrid("option", "height", 300);
as suggested by the help:
http://paramquery.com/pro/api#option-height

but it is not working.  Please see jsfiddle here for example:
http://jsfiddle.net/RedBully/b6b710mz/101/

I plan to have a height of flex but to change the height to 500px if the flex height exceeds 500px.  Alternatively, do you plan to implement a maxHeight option for the grid?

Thanks in advance
« Last Edit: May 06, 2015, 03:12:25 pm by RedBully »

RedBully

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 51
    • View Profile
Re: Setting Height after initialisation
« Reply #1 on: May 06, 2015, 03:17:37 pm »
My current work around is to count the number of rows in the grid before initialisation and to change the options before initialising the grid.  This is a weak solution because the heights of the individual rows can vary.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Setting Height after initialisation
« Reply #2 on: May 06, 2015, 06:24:31 pm »
Refresh is required after change in height option.

http://jsfiddle.net/b6b710mz/103/

Yes, max-height is a planned feature, it would be available in one of the upcoming versions.

RedBully

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 51
    • View Profile
Re: Setting Height after initialisation
« Reply #3 on: May 06, 2015, 07:18:01 pm »
Thank you for this. Please could you update the documentation to say the same about the 'refresh'.

lsl

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Re: Setting Height after initialisation
« Reply #4 on: May 13, 2015, 08:44:12 am »
will the next version also have a "maxwidth" setting?


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Setting Height after initialisation
« Reply #5 on: May 14, 2015, 09:07:43 am »
I've added maxWidth to the list but it's a low priority feature as of now, it may not be present in the immediately next version.
« Last Edit: May 14, 2015, 09:25:32 am by paramquery »