Hi Tim,

Thanks for this, unfortunately that's going to be a no-go. Basically I
have an item renderer which is used create an 'edit' button. Upon clicking
that the view will change to give more detail on that item. The
selectedIndex of the datagrid could be different to the row they actually
clicked on.

I don't understand at all why rowIndex is coming back as the datagrid
index, rather than the dataprovider's index - it's totally baffled me.

I really need to work out a way of getting the row index of the
dataprovider, rather than the datagrid from within the itemrenderer

Steve




-----Original Message-----
From: "Tim Hoff" <[EMAIL PROTECTED]>
Sent: Tuesday, July 4, 2006 5:25 pm
To: [email protected]
Subject: [flexcoders] Re: listData rowIndex ) [f2 final]

Hi Steve,

Have you considered using DataGrid.selectedIndex.  This is the same
index as the dataProvider item.

-TH

--- In [email protected], "Steve Cox" <[EMAIL PROTECTED]> wrote:
>
> I'm hoping I'm making a stupid mistake somewhere regarding
rowIndex from
> within an item Renderer.
>
> The docs state:
> rowIndex : int
> The index of the item in the data provider.
>
> However in practice the rowIndex I'm actually getting is the
rowIndex of
> the DataGrid itself, not the dataProvider. So for example if I
were to
> click onto an item it's rowIndex may be 7, but scrolling down a
little
> the rowIndex changes. This is obviously not the rowIndex of the
> provider, but the datagrid.
>
> I'm using the following code:
>
> var evt:DataGridItemEvent = new DataGridItemEvent("editItem");
> evt.rowIndex = listData["rowIndex"];
> var owner:DataGrid = listData["owner"];
> owner.dispatchEvent(evt);
>
> Where DataGridItemEvent is a simple custom event.
>
> Any clues?
>
> Cheers, Steve
>











--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to