Author Topic: Not able to hide column.  (Read 5047 times)

aniket.kulkarni

  • Newbie
  • *
  • Posts: 22
    • View Profile
Not able to hide column.
« on: June 10, 2014, 06:46:13 pm »
Hi!

I want to hide column based on some value. I am getting the value. I used API code http://paramquery.com/pro/api#option-column-hidden

            var colM = $("#grid_json").pqGrid("option", "colModel");           
            colM[10].hidden = true;
            $("#grid_json").pqGrid("option", "colModel", colM);

But not able to hide. colM is JSON object array. So, colM[10].hidden = true; is not working.

Please help.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Not able to hide column.
« Reply #1 on: June 10, 2014, 06:52:55 pm »
refresh the grid after change in option.

$("#grid_json").pqGrid("option", "colModel", colM);
$("#grid_json").pqGrid( "refresh" );

aniket.kulkarni

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Not able to hide column.
« Reply #2 on: June 10, 2014, 06:59:57 pm »
Thanks for quick reply.  :)