?
Solved

Read data from DataGrid with ActionScript 2

Posted on 2009-04-25
6
Medium Priority
?
614 Views
Last Modified: 2013-11-11
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
0
Comment
Question by:andre72
  • 3
  • 3
6 Comments
 
LVL 11

Accepted Solution

by:
Eaddy Barnes earned 2000 total points
ID: 24235760
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
 

Author Comment

by:andre72
ID: 24235886
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
 
LVL 11

Expert Comment

by:Eaddy Barnes
ID: 24236359
where does the data in the datagrid come from?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:andre72
ID: 24237074
It will be added at this way:
var anObject = {Pos:"", Article:Art, Quantity:"1"};
var addedObject = _root.cList.addItem(anObject);
0
 
LVL 11

Expert Comment

by:Eaddy Barnes
ID: 24237744
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
 

Author Comment

by:andre72
ID: 24237780
var anObject = {Pos:"", Article:Art, Quantity:"1"};
is inserted from other input boxes, there's no external data loaded
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question