Tuesday, May 27, 2008

Dynamic (Advanced)DataGrid columns

Trying to add columns dynamically to your DataGrid or AdvancedDataGrid and having trouble with specifically setting the width of a column?

Try the following:

var cols: Array = datagrid.columns;
datagrid.columns = cols;
// The following line is very important
// (otherwise the grid won't be aware of the new columns yet)
// Force the width of a specific column
cols[0].width = 40;

Thursday, May 15, 2008

Reducing the space between the legend marker and the legend label

If you ever try to reduce the space between the legend markers and the legend labels:

horizontalGap: 0;
verticalGap: 0;