yourDataGrid.addEventListener(ListEvent.ITEM_CLICK, setColumnCopy);
function setColumnCopy(){
_selectedCol = yourDataGrid.columns[event.columnIndex].dataField;
Alert.show(yourDataGrid.selectedItem[_selectedCol]);
}
-Original Message-
From: flexcoders@yahoogroups.com
[ma
I think my last lines are a bit vague and confusing.
It isnt the actual index in the dataprovider.. but
rather the offset in the data provider of properties
depending on how you have laid out your elements. So
the reliability of this method depends - needless to
say - your prior knowledge of how th
OMG i just realized I just gave you the reverse of
what you are asking for haha. my bad. anyway, try
using datagrid's indicesToIndex() method. It will
return the index (in your dataprovider)... I assume
you can then look up your dataprovider to determine
which item/prop/text is which? :)
Cheers!
Hi listen for the itemclickevent and then use
specifically ListEvent as the event type paramter of
the listener then use the rowIndex and columnindex
properties like so:
private function test(e:ListEvent):void{
trace(e.rowIndex.toString());
trace(e.columnIndex.toString());
}
be aware however that
It's not usual to access data from the grid, you access data from it's
dataprovider that is normally either a ArrayCollection or a XML object.
Imagine your grid has the following data provider:
var xml:XML =
;
So you can access data this way:
[EMAIL PROTECTED] will return Roger.
[EMAIL PROT
5 matches
Mail list logo