Try This.
http://blog.flexexamples.com/2008/04/09/creating-a-custom-sort-on-a-datagrid-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

Reply via email to