Results 1 to 5 of 5

Thread: [RESOLVED] Urgent help needed: Multiple sorts using Flex Grid

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2006
    Posts
    23

    Resolved [RESOLVED] Urgent help needed: Multiple sorts using Flex Grid

    I have some data in a flex grid which is not coming from any database. The grid is filled with data as user selects few objects in the program. I want to sort this data with multiple sorts, how do i do that? I have figured out how to sort with just 1 column by using the grid1.sort = flexsortstringascending, but i dont know how can i sort using column 1 and then by column 2, etc. Any suggestion would be highly appreciated.

  2. #2
    Fanatic Member
    Join Date
    Jul 2006
    Location
    nasik,india
    Posts
    909

    Re: Urgent help needed: Multiple sorts using Flex Grid

    at the time of entering data in flexgrid, you must sort it in wany you want and then add it.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2006
    Posts
    23

    Re: Urgent help needed: Multiple sorts using Flex Grid

    How do i sort it before adding it to the grid. Actually i have a screen where the user selects different items in combo boxes which have the same detail. For example there are total 4 sets of combo boxes (arrays) -
    Country
    City
    Street
    The user selects data for 4 sets of country, city and street from the combo boxes. Now i have a loop running from 0 to 3 which sends all this data from the combo boxes into a 3x4 grid. How do i sort the data first by country, then by city?

  4. #4
    Fanatic Member
    Join Date
    Jul 2006
    Location
    nasik,india
    Posts
    909

    Re: Urgent help needed: Multiple sorts using Flex Grid

    can you give me actual source code .. which you are using ?

  5. #5
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Urgent help needed: Multiple sorts using Flex Grid

    FlexGrid sorting is good for simple sorting but is restrictive for complex sorting.

    Anyways, to sort multiple columns you need to define a Range of columns

    The following sorts all rows based on columns 1, 2 and 3.

    VB Code:
    1. With FlexGrid
    2.    .RowSel = .Row 'forces grid to Sort all rows
    3.    .Col = 1
    4.    .ColSel = 3
    5.    .Sort = flexSortGenericAscending
    6. End With

    Note the restrictions

    Sorting is always Left to Right
    You can only Sort on contiguous columns (ie you cannot sort by col 1, 4 and 7)
    You cannot have one column Ascending and another Descending.

Posting Permissions

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



Click Here to Expand Forum to Full Width