ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: cijojohn on June 17, 2017, 04:25:55 pm
-
Hi Team,
I am Facing Issue with show/hide column in group header.
I want , when i pass parent dataindex of 1st level then it should hide all the child of this column.
And when i pass dataindex of child level it should hide that column only.
Please advise.
Thanks,
-
dataIndx is used for data binding. Only child level columns are data bound and thus have dataIndx.
Parent columns don't have dataIndx.
Here is the example for show/hide column example for child level columns. https://paramquery.com/pro/demos/showhide_groups
Parent columns can be identified by colIndx.
var CM = grid.option('colModel');
CM[0].hidden = true; //hide top level column with colIndx: 0
grid.refreshCM(); //refresh colModel.
grid.refresh(); //refresh view.
-
Hello team,
this is not working for me. because i am hiding child level as well as parent level both at a time for child level it is working.
But for parent its not.
Please Suggest.
-
When you hide the parent column, child columns are hidden too.
There is no GUI, you have to do it with code.
For this example: https://paramquery.com/pro/demos/showhide_groups, top level columns can be hidden as
var CM = grid.option('colModel');
CM[0].hidden = true; //hide first top level column ( Some No)
CM[1].hidden = true; //hide company column
CM[2].hidden = true; //hide "Balance Sheet" column
grid.refreshCM(); //refresh colModel.
grid.refresh(); //refresh view.
-
that is fine, individually it is working but when we implement child level and parent level show hide at a time then it is creating problem for me. i m hiding child and parent column in different column not at same same column. because i have such requirements like for one column i have to hide some column and for other i have to hide all columns. and i have some child column those need to be hidden always.
-
That shouldn't be a problem. The columns can be hidden/ shown in any possible combinations. Columns which need to hidden all the times could be moved out of the grouped columns.
Can you please share a jsfiddle of the issue you are facing, so that I can help you.