?
Solved

sort in FlexGrid

Posted on 2002-07-11
5
Medium Priority
?
693 Views
Last Modified: 2012-05-07
How do I sort by col1, col4 in FlexGrid ?
0
Comment
Question by:tryforum
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 4

Expert Comment

by:gencross
ID: 7147147
I believe you are going to have to do it manually before the data is put into the grid.

Is the data coming from a recordset?
0
 

Author Comment

by:tryforum
ID: 7147165
no, it does not come with recordset.

I am only able to sort one column at a time.
0
 
LVL 4

Expert Comment

by:gencross
ID: 7147179
This sounds like something you are going to have to sort yourself.

Sort the data by the first column (col1) then retrieve the data from col4.  You can then sort it like you did col1 or put it into an array and run it through a sort routine (There are many array sorting routines as www.planetsourcecode.com  Search for "Sort array")  Once it is sorted load it back into the grid in col4.

If you tell me exactly where the data is coming from and what you are doing there might be a better way of doing it.
0
 
LVL 43

Accepted Solution

by:
TimCottee earned 200 total points
ID: 7148491
You *can* sort on multiple columns, however they have to be adjacent. The only viable solution to this is to create two additional columns, containing the same values as col1 & col4 and set the width to 0 effectively hiding these columns. You can then set .Col and .ColSel to select both columns and then .Sort as whichever sort method you prefer.
0
 
LVL 4

Expert Comment

by:gencross
ID: 7148837
TimCottee is correct.  I did some more playing with the flxgrid and this will work just fine (and a much better solution that I overlooked)

:)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question