Read data from DataGrid with ActionScript 2

Hi,

I'm a novice with Flash and have to modify an application.
There's a datagrid within this app and I need the data from.
So at the screen the datagrid, called cList and have this code:
cList.columnNames = ["Pos","Article","Quantity"];

dbList = new Array();
cList.dataProvider = dbList;

I tried this with by button but it's always empty:
on(click){
      trace(_root.dbList.length);
      for(var i in _root.dbList) {
      var value = _root.dbList.getItemAt(i - 1).Article;
      trace(value);
      }
}

Can somebody show me the right way please?

Thanks,

Andre
andre72Asked:
Who is Participating?
 
Eaddy BarnesConnect With a Mentor ITCommented:
hello

pelase have a look at this tutorial

http://www.kirupa.com/developer/flash8/datagrid.htm

please let me know if it helps

GE
0
 
andre72Author Commented:
Hi,

thanks for the link but there's only explained how to add items and to sort them.
I need hints how to read the added items...

Andre
0
 
Eaddy BarnesITCommented:
where does the data in the datagrid come from?
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
andre72Author Commented:
It will be added at this way:
var anObject = {Pos:"", Article:Art, Quantity:"1"};
var addedObject = _root.cList.addItem(anObject);
0
 
Eaddy BarnesITCommented:
does the data that is loaded into the datagrid not come from a variable of an external data file such as xml   or perhaps both?

GE
0
 
andre72Author Commented:
var anObject = {Pos:"", Article:Art, Quantity:"1"};
is inserted from other input boxes, there's no external data loaded
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.