I have not seen any way to do this except by adding the index to the
dataProvider.  You would just need to rebuild the index after the drop
action, or after a sort.

 

Now, an idea. Perhaps, if your item renderer extends IdropInItemRenderer
and so has access to the listData, and the dataProvider is a collection,
you could use listData.getChildIndex(data) to get the index?  Just
brainstorming here, you'll need to try it.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of williamkusumo
Sent: Wednesday, June 13, 2007 7:32 PM
To: [email protected]
Subject: [flexcoders] Show incremental numeric index in a List

 

Hi!

I have a List bounded to a dataProvider and an itemRenderer. Could
anyone advice me on how I can insert an incremental numeric index in
each list item (1, 2, 3, and so on)? This list can be re-arranged via
drag-n-drop, so I can't put the index as part of the data.

Any help will be greatly appreciated.

Thanks!

 

Reply via email to