:: Forum >>

hide column


I want to hide few columns programatically in my XML based Grid. I tried
setColumnIndices([]); function, the column is hidden, but the underlying data also disappears. I have multiple tables of same type in the same page, so cant define separate CSS for each of the tables.

Is there any function like setColumnIndices but will keep the data intact? The forums showed something like setColumnValues() but is that present in V2.0?

Raj Nair
Wednesday, August 23, 2006
The data from the hidden columns does not disappear when you hide them with setColumnIndices() method. You can still access it with getCellText() or getCellData() using the hidden column index -

var myData = [
    ["123", "Row 1", "abc"],
    ["456", "Row 2", "xyz"]

var obj = new AW.UI.Grid;
obj.setColumnIndices([1, 2]); // hide column-0

var text = obj.getCellText(0, 0); // get data from the hidden cell
Alex (ActiveWidgets)
Thursday, August 24, 2006

This topic is archived.

Back to support forum

Forum search