You probably have to get children() from the XML and create your own
array of DataGridColumns at runtime.

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jason vancleave
Sent: Tuesday, March 27, 2007 1:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Sorting Datagrid column headers



I am using a DataGrid with a dataprovider of xml. This is working 
fine with the exception of the column headers being ordered 
alphabetically instead of copying the XML structure.

The DataGrid would format the following xml with column headers in 
the order of
disabled, id, media, ordernumber, title

The docs in DataGrid.columns talks about a way to "explictly set" 
this but I can't find a good example. I am thinking maybe there is an 
easier way to sort the data higher up the chain.

Thanks,
Jason

<?xml version="1.0" encoding="UTF-8"?>
<root>
<gallery>
<item>
<id>1</id>
<disabled>0</disabled>
<title>HomeContent</title>
<ordernumber>0</ordernumber>
<media>AVLibrary2.swf</media>
</item>
<item>
<id>2</id>
<disabled>0</disabled>
<title>HomeContent</title>
<ordernumber>1</ordernumber>
<media>reelcutweb.jpg</media>
</item>
<item>
<id>3</id>
<disabled>0</disabled>
<title>HomeContent</title>
<ordernumber>2</ordernumber>
<media>OMARBONELESSAD.jpg</media>
</item>
</gallery>
</root>



 

Reply via email to