Author Topic: Disable/Enable Grid  (Read 2395 times)

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
Disable/Enable Grid
« on: April 03, 2020, 02:49:18 am »
Hi, How can I enable/disable the grid. I tried a method from the api documentation but not working.
https://jsfiddle.net/jasqh58n/

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Disable/Enable Grid
« Reply #1 on: April 03, 2020, 09:00:11 am »
It's a css issue in previous versions which is fixed in v7.1.0

Please check this https://jsfiddle.net/b2hxrycg/

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
Re: Disable/Enable Grid
« Reply #2 on: April 03, 2020, 04:33:00 pm »
I have those same css references in my page, but still get this JS error. Any ideas?

$myGrid.disable is not a function

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Disable/Enable Grid
« Reply #3 on: April 03, 2020, 10:43:42 pm »
Please check the type of $myGrid variable.

If it's jQuery variable, then syntax is

Code: [Select]
$myGrid.pqGrid( 'disable' );

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
Re: Disable/Enable Grid
« Reply #4 on: April 03, 2020, 11:48:48 pm »
That worked. Thanks.