One thing to look at would be dispatch a HEADER_RELEASE event on the datagrid. Its not the most straightforward fix, and will take a little tweaking to get to work right, but it is doable.
-----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Adam Royle Sent: Thursday, March 01, 2007 8:09 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] simulate datagrid header click, or set default sort column Hi guys, This came up last week but no working response was given. I have my data sorted in a dataProvider, however whenever I add new data I add it to the end of the ArrayCollection. However this means the datagrid is no longer sorted correctly. I wish I could execute the private method sortByColumn() that exists in the DataGrid class, but it's private!! Anyone with a solution? I have tried subclassing and also copying code directly, but the sortByColumn method uses private variables, so I'm stuck again. Can anyone suggest a solution to my problem? Cheers, Adam