PDA

View Full Version : [CLOSED] Hide GridPanel Column based on Column Name



speedstepmem4
Jun 30, 2014, 10:51 AM
Hi,

How to hide Grid Panel column based on column name by client side and server side?

Daniil
Jun 30, 2014, 1:43 PM
Hi @speedstepmem4,

Please clarify what exactly do you mean by a Column's Name? There is no such the property. There are, for example, ID, Text, DataIndex.

speedstepmem4
Jul 01, 2014, 5:56 AM
Hi,
in v1.x, we have used following source to find and hide the column in grid panel.


var column = gd_packingpos.colModel.getColumnById('StockLocatio nName');
if (column != null) column.hidden = true;

In V2.x, how to find and hide column in grid panel for both client side and server side?

Daniil
Jul 01, 2014, 11:35 AM
I think this should work.

JavaScript

App.ColumnID.hide();

C#

this.ColumnID.Hidden = true;

speedstepmem4
Jul 02, 2014, 5:01 AM
Hi,

Thank You,

Columns are initialize dynamically from XML in code behind. Columns are not static.

In this case how to find and hide the column in Grid Panel?

geoffrey.mcgill
Jul 02, 2014, 7:21 AM
You can get an instance of the Column by ID or by Index.