--- In [email protected], Indra Prastha <[EMAIL PROTECTED]> wrote: > > Hi guys, > > I need help about working with large data in a datagrid. > I have a datagrid that displays about 500 + rows which gets data from my > backend in XML (http service, resultFormat = e4x ). > Right now I want to display the row number for the data grid in the > first column "No.", without actually sending <no>row#</no> xml child in > the data that is sent from the backend, i tried using example from the > documentation using listData function, it works fine only for the > displayed data, what i mean is that, since there are 500 data and the > datagrid only shows about 15 first (the rest u have to scroll down) when > you scroll down, the number resets (means the 16th row shows the row > number as 0 again). > > Found no other way to programmatically counts the row and display it in > the datagrid, i included <no>row#</no> in the XML being sent and works > like just i wanted .... UNTIL I click on the header and tried to sort it > ascending / descending. Now flex instead of sorting my data 1 to 500 or > 500 to 1 , it thinks that these numbers are string and sort them like a > string -> ascending sort will result in sort like this > 1,10,100,101,102...109...2,20,200,201 ..... and vice versa for > descending.
This might help http://flexdiary.blogspot.com/2007/11/showing-item-number-in- itemrenderer.html HTH; Amy

