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!
-leds
--- leds usop <[EMAIL PROTECTED]> wrote:
> 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 these indeces are relative to
> the visual grid, hence the headers (if you use them)
> are counted. Just compensate approprately.. like
> subtract 1 from the rowindex. :) Cheers!
>
> -leds
>
>
>
> --- helihobby <[EMAIL PROTECTED]> wrote:
>
> > 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 [email protected], "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.
> > >
> >
> >
> >
>
>
>
>
>
____________________________________________________________________________________
> Now that's room service! Choose from over 150,000
> hotels
> in 45,000 destinations on Yahoo! Travel to find your
> fit.
> http://farechase.yahoo.com/promo-generic-14795097
>
____________________________________________________________________________________
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail