3.2.0

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
August 23,
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)
August 24,

This topic is archived.

See also:


Back to support forum