You should try to sort the ArrayCollection that is bound to the dataGrid's dataProvider. Once the collection or the source array is sorted, your data grid will be sorted.
Kim --- In flexcoders@yahoogroups.com, "kehlpeter" <[EMAIL PROTECTED]> wrote: > > Hi, > > is there any way to set a default/initial order column for a DataGrid > in Flex2? > > None of the following compiles in Flex 2: > grid.sortItemsBy( 'columnName', 'asc'); > grid.sortIndex= 1; > grid.sortDirection= 'ASC'; > grid.placeSortArrow(); > > I can't see any method/property to do this directly. I know how to > create a DataGridEvent with type being DataGridEvent.HEADER_RELEASE, > but don't know how to 'trigger' or dispatch it. I've tried > dispatchEvent( event ) in both application.creationComplete and > grid.initialize. > > Thank you for any ideas. >