# dataGrids and cells

**URL:** <https://forum.kirupa.com/t/datagrids-and-cells/244516>\
**Category:** flash\
**Created:** [November 19, 2007, 9:11am UTC](https://forum.kirupa.com/t/datagrids-and-cells/244516 "2007-11-19T09:11:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eimclark](https://avatars.discourse-cdn.com/v4/letter/e/ce7236/32.png) [@eimclark](https://forum.kirupa.com/u/eimclark)\
**Post date:** [November 19, 2007, 9:11am UTC](https://forum.kirupa.com/t/datagrids-and-cells/244516/1 "2007-11-19T09:11:39Z")

</div>

Really need help here, hope this is the place to find it.

I have a dataGrid with 3 columns and 20 rows.

I want to multi-select rows and pass the values from the cells in the 2nd column to a new list.  
I’m kind of almost there but I’m stuck because I don’t know what property of the dataGrid to use.  
My code will populate the new list but it only shows the row index numbers i.e 0,1,2,3 etc.:td:  
Whereas I want the list show Tom,Richard,Harry etc. (values from the 2nd column of the dataGrid).  
What property will get the cell values from the 2nd column:q:

Here’s my code.

```auto
var listB:List = new List();
listB.selectable = false;
listB.move(120, 250);
addChild(listB);
 
function changeHandler(event:Event):void {
    if (myDataGrid.selectedItems.length > 0) {
        listB.dataProvider = new DataProvider(myDataGrid.selectedIndices);
        trace(myDataGrid.selectedIndices);

```

I’m new to Flash CS3 and actionscript 3.0. Many thanks
