View Full Version : Help with Datagrid

03-03-2008, 11:07 PM
let's say i have a datagrid on stage.
it's made up of three columns First, Middle and Last.

my question is how do i populate all of the names(cell text values) from the datagrid to a var so that it reads like this, for example: john doe, jane doe, joe doe? :confused:

var my_grid:mx.controls.DataGrid;
// sample datagrid
my_grid.addItem({First:'John', Middle:'Lee', Last:'Doe'});
my_grid.addItem({First:'Jane', Middle:'Jill', Last:'Doe'});
my_grid.addItem({First:'Jack', Middle:'Joe', Last:'Doe'});

addBtn.onRelease = function() {
var names:Object = //..some code here to populate all their names from datagrid into a format like this: john doe, jane doe, joe doe;

trace(some var with populated names from datagrid);

please help, any help will be greatly appreciated.