ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: przemek on April 28, 2014, 04:35:29 pm

Title: Reset columns visibility
Post by: przemek on April 28, 2014, 04:35:29 pm
Hello,

I'm using Param Query script to show/hide columns and i would like to know how to bind "reset" action after which all columns will be visible and in the original order.

Please tell me how to do it :)
Title: Re: Reset columns visibility
Post by: paramvir on April 28, 2014, 09:34:12 pm
colModel is an array of columns

You can reset all columns to visible by updating their hidden property to false in a loop

Code: [Select]
var CM = $grid.pqGrid( "option" , "colModel" );
for( var i=0;i< CM.length; i++ ){
  var column = CM[ i ];
  column.hidden = false;
}
$grid.pqGrid( 'refresh' );