If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > FlexGrid Sorting

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-13-04, 13:43
jhuck jhuck is offline
Registered User
 
Join Date: Jan 2004
Posts: 53
FlexGrid Sorting

Hi,

Is it possible for me to set up sorting in a flex grid as it can be done in a program like Excel. (I want to provide an interface for sorting data in a flexgrid) This would be very helpful to me. I am open to any ideas, suggestions, third party code (preferrably free) ha!


Thanks
__________________
Jason
Reply With Quote
  #2 (permalink)  
Old 05-19-04, 07:56
jomafemar jomafemar is offline
Registered User
 
Join Date: Feb 2003
Posts: 15
I think that this solve your question


Private Sub Grid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If y < 225 Then
If ord = 1 Then
Grid1.Sort = flexSortStringAscending
ord = 2
Else
Grid1.Sort = flexSortStringDescending
ord = 1
End If
Grid1.Refresh
End If
End Sub
Reply With Quote
  #3 (permalink)  
Old 05-19-04, 17:45
jhuck jhuck is offline
Registered User
 
Join Date: Jan 2004
Posts: 53
jomafemar,

What does the variable "ord" reference?

Thanks
__________________
Jason
Reply With Quote
  #4 (permalink)  
Old 05-21-04, 21:59
jomafemar jomafemar is offline
Registered User
 
Join Date: Feb 2003
Posts: 15
just a var, to help you swap from ascend to descend or vice versa
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On