I’m currently building an application in Flash to display and edit values from different tables and databases in MySQL. I’m at the point to display the entries in Flash, and I thought I’d use the DataGrid component for this.
But how do I use this ? I have the arrays with the values, I have the array with the column names, but how do I get the DataGrid component to display the values of these arrays ? I’ve been reading in the manual, but it didn’t give any good examples of how to do this.
Ok, this is driving me INSANE !! I drag a DataGrid component to stage, give it the instane name myDataGrid, and I apply this example code I found in the AS Reference:
myDP = new Array({name:"Chris", price:"Priceless"}, {name:"Nigel", price:"Cheap"});
myDataGrid.dataProvider = myDP;
That works perfectly. When I use this in my application, it just doesn’t work and it’s the same friggin’ code ! It’s driving me insane, it should work, but it just doesn’t ! Why on earth not ? This is the code I used with a DataGrid on stage with the instance name ‘entries’: