Author Topic: change the paramquery width and height in the run time  (Read 1974 times)

bwt

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 17
    • View Profile
change the paramquery width and height in the run time
« on: November 21, 2020, 05:06:21 pm »
i have a resizable react component
i put the pqgrid as a child of this grid

so it's like that
<Parent>

<Pqgrid/>

<parent/>

what i am asking for is i need to change the width and height of the paramqery grid to be 100% of the parent , so when i resize the parent , the grid take 100 width and height same like parent
ps: i cannot calculate the parent height and width for many reasons
« Last Edit: November 21, 2020, 05:09:50 pm by bwt »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: change the paramquery width and height in the run time
« Reply #1 on: November 23, 2020, 09:08:13 am »
There is no need to manually calculate the height / width of parent.

Height/ width of pqgrid can be assigned in percent. "100%"

bwt

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: change the paramquery width and height in the run time
« Reply #2 on: November 23, 2020, 03:26:24 pm »
when i assign it to 100% it take 100% of the data content not the parent ????

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: change the paramquery width and height in the run time
« Reply #3 on: November 23, 2020, 03:37:35 pm »
https://paramquery.com/pro/api#option-height

https://paramquery.com/pro/api#option-width

Please share a stackblitz if you are not getting expected result.