PDA

View Full Version : Hide Grid Column from instance Gridview



Solitaer
27 May 2014, 12:36 AM
Hi,

I have a content container and adde there different panels.

One of this is a Gridview.
I add this to the contentcontainer and have a funktion in the Controller
afterrenderer.

And a Reference of the Gridview in it.

Now i want to hide 3 Colums from this grid. But it dosent Work.

I testet this:

var grid = this.getMygridview1();
var column=grid.columns[1];
column.hidden = true;

Can anyone help pls.

vardhan22
27 May 2014, 1:51 AM
Refresh the grid view after hiding column.




grid.getView().refresh();



It should work

skirtle
27 May 2014, 3:15 AM
I'd try something like this:


grid.query('gridcolumn')[1].hide();

Or even better, identify the column by something other than index, like maybe an itemId or dataIndex.

Solitaer
27 May 2014, 3:26 AM
No. The Problem was i looked on the grid and not on gridview.
With the GridView, it works just fine!