Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Problem in sorting the DataGrid with pagination

    I have a datagrid with pagination. On default it sorts only the current page data.

    requirement is : sort across all records returned in result set, not only the records for the current page.

    Need Help . Please share the sapmle code.

    Thanks...

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    What is this for, and can you show us what you have so far (code and link)?
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #3
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Thanks a lot for reply.

    Below is the links from which I followed for the Datagrid pagination:

    http://develop.gurufaction.com/src/App.mxml
    http://gurufaction.blogspot.com/2007...mple-with.html

    Datagrid Pagination is working fine for me .But facing the problem in grid sorting.
    By default it sorts the records for the current page.
    But it should sort across all records returned in result set i.e it should sort whole data grid.

    If you will look into the code of paging example from the above link:

    myData = new ArrayCollection( orgData.source.slice((start * pageSize),(start * pageSize) + pageSize) );

    <mxataGrid id="dg" dataProvider="{myData}" />

    Though the grid is populating from myData arraycollection, so it sorts the current page. On cliking the grid header for sorting , if we can sort the orgData and refresh the myData arraycollection from sorted orgData arraycollection, It could resolve my problem.

    Need your help / suggestion . Please share the code sample


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •