:: Forum >>

hide column

All,

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?

thanks
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.setCellData(myData);
obj.setColumnIndices([1, 2]); // hide column-0
obj.setColumnCount(2);
obj.setRowCount(2);
document.write(obj);

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

This topic is archived.


Back to support forum

Forum search