I’ve never used DataGrid before and it looks easy. I found a few comprehensive tutorials and followed them to the letter and yet I am having problems. I can get the dataGrid component added to the Display List and the columns’ labels read just fine. BUT, the rows under the columns are blank.
I am using Flash CS3;
Code below:
import fl.controls.DataGrid;
var testDataGrid:DataGrid=new DataGrid();
testDataGrid.width=400;
//testDataGrid.move(stage.stageWidth/8,stage.stageHeight/5);
testDataGrid.move(10,10);
addChild(testDataGrid);
var program:String="Government program or tax";
var amount:String="Amount saved or raised";
var programShameless:String="Shameless pandering to unions";
var programFascist:String="Fascist destruction of the economy";
var programTaxing:String="Taxing the middle class to death";
var amountShameless:String="$11 billion";
var amountFascist:String="$40 billion";
var amountTaxing:String="$80 billion";
testDataGrid.addColumn(program);
testDataGrid.addColumn(amount);
testDataGrid.addItem({program:programShameless,amount:amountShameless});
testDataGrid.addItem({program:programFascist,amount:amountFascist});
testDataGrid.addItem({program:programTaxing,amount:amountTaxing});