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
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>"]);
};
};
thanks, arcaRox.
now I have
listenerObject = new Object();
listenerObject.change = function(eventObject){
trace (grid_instance.selectedItem.column_name);
}
timeInfo_grd.addEventListener("change", listenerObject)
and it works!