Author Topic: How can I collapse grid progromatically?  (Read 3961 times)

stoodin

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 85
    • View Profile
How can I collapse grid progromatically?
« on: April 17, 2014, 12:52:11 am »
Hi,
I would like to collapse the grid by default and show just a header to allow user to expand it when they need. I just can't find any  events/method to do so.
Could you give me a hint, please?
Thank you

stoodin

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 85
    • View Profile
Re: How can I collapse grid programatically?
« Reply #1 on: April 18, 2014, 01:27:53 am »
Any chance you can answer that?

I just need to know how to collapse/expand the grid from the code rather than clicking on the icon.

Thank you very much.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: How can I collapse grid progromatically?
« Reply #2 on: April 18, 2014, 05:12:07 pm »
There is no API for it currently.

you may use jQuery to click on the icon programmatically.

Code: [Select]
  $(".pq-slider-icon .ui-icon", $grid ).click();

Please note the code is not tested. You may need to check it.

stoodin

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 85
    • View Profile
Re: How can I collapse grid progromatically?
« Reply #3 on: April 18, 2014, 11:00:57 pm »
Great, Fantastic.
That is exactly what I need and it works just fine.
Many thanks.