ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: alonewolf149 on August 05, 2020, 10:14:20 am
-
Hi ,i have applied param table in multiple modules with "show/hide column" features.
but some module , i want to hide this section :
http://prntscr.com/tu8dab
now we sharing param js, etc. is there any solution to hide this section only some of module ?
thanks
Thanut
-
You haven't shared any code, so I presume you are using the same options for multiple grids.
First of all, the options need to deep cloned before sharing them across multiple grids.
Then you can remove a certain item from the toolbar for a certain grid by simple array manipulation methods like splice() on toolbar.items
-
we have sharing same code and even using same ID. http://prntscr.com/tugo5d
so in this case if some module we want to hide it how can we do
u refer about "simple array manipulation methods like splice() on toolbar.items"
can u more specific how can i hide it
this is i used for show show/hide
/*hide/show columns*/
{
type: 'select',
cls: 'columnSelector',
attr: "multiple='multiple'", style: "height:60px;",
options: function (ui) {
//options in the select list correspond to all columns.
return this.getColModel().map(function(column){
var obj = {};
obj[ column.dataIndx ] = column.title;
return obj;
});
}
},
thanks
-
It can be removed from the toolbar with this code.
obj.toolbar.items.splice(index, 1);
//initialize the grid.
pq.grid( "selector of grid", obj );
where obj is initialization object of grid and index is index of show / hide columns item in the toolbar.items array.