Thanks. However, I looked at the code and it looks basically the same as mine with the only noticeable difference being the compare function. Is the compare function necessary if I am only sorting by one column (Date)?
Thanks. --- In flexcoders@yahoogroups.com, "Igor Costa" <[EMAIL PROTECTED]> wrote: > > Try This. > http://blog.flexexamples.com/2008/04/09/creating-a-custom-sort-on-a-data\ grid-control-in-flex/ > > > It will help you. > > > Regards > Igor Costa > www.igorcosta.org > > > On Fri, Sep 5, 2008 at 7:53 PM, sleblang [EMAIL PROTECTED] wrote: > > > I am getting the following error when attempting to run a sort on a > > datagrid's dataprovider (which is an XMLListCollection). It doesn't occur > > the first time I run the sort, however all subsequent runs result in an > > error: > > > > Error: Find criteria must contain at least one sort field value > > > > Here is the sort code: > > > > // sort on date > > var sortA:Sort = new Sort(); > > var sortByDate:SortField = new SortField("@date",false,false) > > > > sortA.fields=[sortByDate]; > > > > // Refresh the collection view to show the sort. > > modelLocator.projectData.projectData_xlc.sort = sortA; > > modelLocator.projectData.projectData_xlc.refresh(); > > > > Any ideas as to where the error might be? > > > > Thanks for any and all replies. > > > > > > > > > > > > > > -- > ---------------------------- > Igor Costa > www.igorcosta.com > www.igorcosta.org >