# How can i get the value of cell using DataGrid?

**URL:** https://forum.kirupa.com/t/how-can-i-get-the-value-of-cell-using-datagrid/120570
**Category:** Uncategorized
**Created:** [August 25, 2004, 2:42pm UTC](https://forum.kirupa.com/t/how-can-i-get-the-value-of-cell-using-datagrid/120570 "2004-08-25T14:42:10Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kos](https://avatars.discourse-cdn.com/v4/letter/k/c5a1d2/32.png) [@kos](https://forum.kirupa.com/u/kos)
#### Post date: [August 25, 2004, 2:42pm UTC](https://forum.kirupa.com/t/how-can-i-get-the-value-of-cell-using-datagrid/120570/1 "2004-08-25T14:42:10Z")

</div>

hi,  
I use the DataSet component to manage my data, which I get from xml file. to display data I use the DataGrid.  
I need to get value of focused cell and send it to the window or text field.  
how can I make it? I can’t find method to get value of cell ☹  
thanks

---

<div class="post-metadata">

### Author: ![arcaRox](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@arcaRox](https://forum.kirupa.com/u/arcaRox)
#### Post date: [August 25, 2004, 3:09pm UTC](https://forum.kirupa.com/t/how-can-i-get-the-value-of-cell-using-datagrid/120570/2 "2004-08-25T15:09:05Z")

</div>

Have you tried using change event of the DataGrid? You can subscribe to this event then use dataGrid.selectedItem.columnName to get the value. The selectedItem property will give you the data of the selected row. The cell you want is the column name property of this item.

```auto

dg.addEventListener ("change", this);

function handleEvent (oEvt) {
	if (oEvt.type == "change") {
		var itm = oEvt.selectedItem;
		trace (itm ["<your column name here>"]);
	};
};

```
