Populating DataGrid with SQLResult Air Flex
Posted
by Deyon
on Stack Overflow
See other posts from Stack Overflow
or by Deyon
Published on 2010-03-21T03:13:09Z
Indexed on
2010/03/21
3:21 UTC
Read the original article
Hit count: 576
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....
© Stack Overflow or respective owner