If the dataProvider is XML, then loop through it and insert a rowNum
attribute.  You will have to do something manual as well for sorting.

 

If it is not XML, I would create a custom item component with a rowNum
property, then loop over the dataProvider, creating and populating the
customItem objects.

 

There may be other ways.  You cannot use an itemRenderer for this
because they are re-used when you scroll.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of rid_b80
Sent: Wednesday, April 25, 2007 9:18 PM
To: [email protected]
Subject: [flexcoders] Datagrid with row number

 

Hi,

Just wondering is there anyway to display the row number in the first
column of the datagrid. So like.

Item Group
1. Apple Fruit
2. Pear Fruit
3. Tissue Hygiene

Cause at the momment i can't seem to display that number 1,2,3
without defining it in the data provider.

Can anyone help please?

Thanks in advance

 

Reply via email to