# Please Help with Datagrid

**URL:** <https://forum.kirupa.com/t/please-help-with-datagrid/253667>\
**Category:** flash\
**Created:** [March 4, 2008, 12:16am UTC](https://forum.kirupa.com/t/please-help-with-datagrid/253667 "2008-03-04T00:16:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nubian](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nubian](https://forum.kirupa.com/u/nubian)\
**Post date:** [March 4, 2008, 12:16am UTC](https://forum.kirupa.com/t/please-help-with-datagrid/253667/1 "2008-03-04T00:16:26Z")

</div>

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? 😕

[AS]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);

```

};[/AS]

please help, any help will be greatly appreciated.
