« Return to the blog entry
Hi Jake,
Just to confirm , While adding columns there should be a check like this which will add the column and keep it hidden .
if ( column.@viewByDefault=="false") {
col.visible=false;
}
So code goes like ,
for each (var column:XML in columns){
var col:DataGridColumn = new DataGridColumn(column);
col.headerText=column.@label;
cols.push(col);
dataGrid.columns = cols;
Hi Jake,
Just to confirm , While adding columns there should be a check like this which will add the column and keep it hidden .
if ( column.@viewByDefault=="false") {
col.visible=false;
}
So code goes like ,
for each (var column:XML in columns){
var col:DataGridColumn = new DataGridColumn(column);
col.headerText=column.@label;
if ( column.@viewByDefault=="false") {
col.visible=false;
}
cols.push(col);
}
dataGrid.columns = cols;