Populating DataGrid with SQLResult Air Flex
- by Deyon
I been beating my self up all day on this...I'm about to call it quits and get some Chinese food -=\ I'm selecting data from a local SQL DB.
[Bindable]
public var ac:ArrayCollection;
public function select():void
{
statement.sqlConnection=conn;
statement.text="SELECT * FROM PROJECT";
statement.execute();
var res : SQLResult = statement.getResult();
ac = new ArrayCollection(res.data);
//So this traces out [Object][object] So it works
trace(ac);
}
If I do var myObj:Object=res.data[0]; I can trace myObj and view the data.
But I don't know how to insert the data into a datagrid.
mygrid.dataProvider=ac; dose not work.
I'm using Flash Builder 4 Help please....