The only way to specify an exact order of columns is to specify the columns before u set the dataprovider.
Greetz Erik -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ashish Abrol Sent: dinsdag 31 mei 2005 13:40 To: flexcoders@yahoogroups.com Subject: [flexcoders] Columns of data-grid and not in right order if dataprovider is set dynamically HI friends, I have a very weird problem. When I say - <mx:Model id="myModel" source="xyz.xml"/> dataGrid.dataProvider=myModel.b at run-time although it works fine but it changes the order in which I mention the atttribute names in my model i.e. my xml file (xyz.xml). For e.g. suppose the xyz.xml is like this <a> <b attribute1="ccc" attribute2="cccc" attribute3="ccccc" ... /> </a> The columns that the datagrid will not be in the order attribute1,attribute2,attribute3... I would appreciate if anyone can fix my problem or tell me any workaroud for this because I am making a function to set the dataprovider for datagrid at run-time and the ordering of columns is essential. Regards Ashish Abrol Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/