Author Topic: Option to set Pqgrid in maximised state one page first load  (Read 2281 times)

sam.shah

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 13
    • View Profile
Is it possible/any option to set pqgrid in a maximized state by default?
When I click on ui-icon to maximize, it hides footer.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Option to set Pqgrid in maximised state one page first load
« Reply #1 on: June 13, 2018, 09:52:56 am »
Grid can be set to maximized state initially with help of create event.

Also custom css can be applied with collapsible.css option

and custom properties can be added in maximized state with help of toggle event.

Code: [Select]
    collapsible: {
      css: {
        margin: 20
      }
    },
    toggle: function(evt, ui) {
      if (ui.state == 'max') {
        this.option({
          height: '100%-40',
          width: '100%-40'
        });
      }
    },
    create: function() {
      this.widget().find(".pq-grid-top .ui-icon-arrow-4-diag").click();
    },

https://plnkr.co/edit/Gvo807T98ILmO88iA7IV?p=preview

sam.shah

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Option to set Pqgrid in maximised state one page first load
« Reply #2 on: June 14, 2018, 08:36:30 am »
Thanks for quick response.
Now, it hides my control which is on top of the grid.
is it possible to change this behavior so it doesn't hide my top control?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Option to set Pqgrid in maximised state one page first load
« Reply #3 on: June 14, 2018, 09:22:10 am »
you can adjust top margin and grid height according to height of top control.