Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - Sorting ListView items
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Sorting ListView items

 Post Reply Post Reply
Author
Message
naikosen View Drop Down
Groupie
Groupie
Avatar

Joined: 01 April 2007
Location: United Kingdom
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote naikosen Quote  Post ReplyReply Direct Link To This Post Topic: Sorting ListView items
    Posted: 26 October 2008 at 7:45pm
I want to get items sorted when a user clicks on the column header.
 
I could sort on columns having text fields.
But when I sort on the columns having numeric fields, it sorts in the following way:
      1
     11
     10
      2
      3
      4
      5
      6
      7
      8
      9
Why are the numbers 11 and 10 not placed after 9? Please guide me to resolve this problem.
 
In the same way, how to sort on Date field?
Back to Top
Mr.Den View Drop Down
Groupie
Groupie
Avatar

Joined: 26 August 2007
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mr.Den Quote  Post ReplyReply Direct Link To This Post Posted: 31 October 2008 at 9:11pm
For the date sorting, I had good luck making times 24 hour values rather than 12 hour with AM/PM, that threw sorts off even with standard Microsoft controls.
Back to Top
Jean View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post Posted: 03 November 2008 at 1:29am
As a quick fix, you could format your numbers, e.g.
Format(lngNumber, "00")


Product: Xtreme SuitePro (ActiveX) Version 15.0.2
Platform: Windows XP (32bit) German - SP 2
Language: VB6 / C# 4.0
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.