# How do I get value of cell in column 3 of the selected dataGrid row?

**URL:** <https://forum.kirupa.com/t/how-do-i-get-value-of-cell-in-column-3-of-the-selected-datagrid-row/173599>\
**Category:** flash\
**Created:** [December 27, 2005, 8:30pm UTC](https://forum.kirupa.com/t/how-do-i-get-value-of-cell-in-column-3-of-the-selected-datagrid-row/173599 "2005-12-27T20:30:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kennyb](https://avatars.discourse-cdn.com/v4/letter/k/c68b51/32.png) [@kennyb](https://forum.kirupa.com/u/kennyb)\
**Post date:** [December 27, 2005, 8:30pm UTC](https://forum.kirupa.com/t/how-do-i-get-value-of-cell-in-column-3-of-the-selected-datagrid-row/173599/1 "2005-12-27T20:30:42Z")

</div>

How do I get value of cell in column 3 of the selected dataGrid row?

For example, if someone selects a cell in row 2 of column 0, how can I get the value of the cell in column 3 of the same row?

I know how to get the value of a selected cell, I just can’t figure out how to do the above. I’m using the following for that.

var myCellListener = new Object();  
myCellListener.cellPress = function(event) {  
var cell = “(” + event.columnIndex + ", " + event.itemIndex + “)”;  
var name = event.target.columnNames[event.columnIndex];  
var item = event.target.dataProvider.getItemAt(event.itemInde x)[name];  
\_root.testText = "Value clicked: " + item + " \_ " + “The cell at " + cell + " has been clicked”;

}
