you can use datagrid.columns property for this. iterate over your collection in action script and then create an array collection of the columns while iterating. assign this collection to datagrid.column.
am in a hurry right now.... reply if you face any problem.. Akshar Kaul On Wed, Aug 4, 2010 at 19:09, neethu n <[email protected]> wrote: > Hi All, > I have a raw collection of objects, I want my data grid to show columns in > the order required by the client and addition of the these columns should be > from action script and not mxml tags like <mx:columns> and > <mx:DataGridColumn> since my collection comes dynamically from the database > and i cant tell before hand how many properites does each object contain and > what are they are (ie I cant tell what are the columns and their data.) All > my googling gives info about vertical sort to columns in datagrid but not > horizontal sort. Can any one please help me. > > if i dont use the tags and assign the dataprovider through as3, columns > appear in alphabetical order by default , atleast disabling this > alphabetical order would be helpful. Any one please suggest > Eagerly waiting for help. > Thanks a lot in advanced. > Neethu > > -- > You received this message because you are subscribed to the Google Groups > "Flex India Community" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<flex_india%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/flex_india?hl=en. > -- You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/flex_india?hl=en.

