How can i get the value of cell using DataGrid?

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 :frowning:

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.

dg.addEventListener ("change", this);

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