Wednesday, December 6, 2006

Column Names of data grid

I was really dumb enough to not to realize that there exists a "DataGridColumn" class which lets me to define my column header of datagrid. I was wondering arround to find out how can I have my column Names with space and wasted lots of time.. but here I found the very simple straight forward way: import mx.controls.gridclasses.DataGridColumn; // Add columns to grid. var name_dgc:DataGridColumn = my_dg.addColumn(new DataGridColumn("phasevol")); name_dgc.headerText = "Phase Vol."; var score_dgc:DataGridColumn = my_dg.addColumn(new DataGridColumn("figurenumber")); score_dgc.headerText = "Figure No." ;my_dg.addItem({phasevol:"01", figurenumber:30});

No comments: