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
[mailto:[EMAIL PROTECTED] On Behalf Of helihobby
        Sent: Monday, February 26, 2007 11:25 AM
        To: flexcoders@yahoogroups.com
        Subject: [flexcoders] Re: Can anyone help on getting data from a
grid cell .. I know the row/column index
        
        

        Thank you all for the answers ...
        The problem is that I need to know which cell he clicked on.
        
        Or in other words, what is the text that displayed on that
cell...
        
        Getting the complete ArrayCollection object which the user
clicked on 
        is easy as I can ( as u guys mentioned ) simply grab the event
and do 
        event.selectedItem.SOME_PROP_HERE
        
        However, I need to know which prop he clicked on as during
runtime I 
        do not know the name of SOME_PROP_HERE.
        
        In my case I have over 40 columns per row and each carries the
name 
        of Open1 Open2 Open3 Open4 ..... etc ...
        
        So of course doing event.selectedItem.Open1 will work.
        
        But how do I know if clicked on the column Open1 or Open2 or
Open3 
        etc ...
        
        I need to figure out which OpenN ( N = number ) he clicked on
...
        
        Thanks again,
        
        Sean.
        
        --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> , "helihobby" <[EMAIL PROTECTED]>
wrote:
        >
        > 
        > Hello,
        > 
        > Can anyone help out ...
        > I know the Data Grid Cell's Row and Colum Index.
        > 
        > How can I retrieve the data in that cell if I know these two 
        values ?
        > 
        > Thank you,
        > 
        > Sean.
        >
        
        

         

Reply via email to