He is not defining the columns array, but letting Flex do it.

 

The problem here is the Flex apparently builds the columns from the xml child nodes array using a for ..in, instead of for var i…

 

The for..in construct does not process the properties in a guaranteed order, but usually returns them in LIFO order.

 

You should define your columns, if you care about how they display.  If you need the columns to change based on the data, you can build them in AS.  Finally, you could reverse the array, maybe myarray.reverse?

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of Jason Hawryluk
Sent: Thursday, March 02, 2006 12:03 PM
To: [email protected]
Subject: RE: [flexcoders] The column order in datagrid

 

What is your "defined" column structure.

 

<mx:DataGrid >
     <mx:columns>
        "your col struc here"...

     </mx:columns>
</mx:DataGrid>

 

 

 

-----Message d'origine-----
De : [email protected] [mailto:[email protected]]De la part de sinacapho
Envoyé : jeudi 2 mars 2006 13:15
À : [email protected]
Objet : [flexcoders] The column order in datagrid

If i input a xml as dataprovider in datagrid
<aa>aa</aa>
<bb>bb</bb>
<cc>cc</cc>


The datagrid column order will be cc, bb,aa .someone tell me why??
thx







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




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to