Print Page | Close Window

Sorting ListView items

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=12533
Printed Date: 22 November 2024 at 8:52am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Sorting ListView items
Posted By: naikosen
Subject: Sorting ListView items
Date 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?



Replies:
Posted By: Mr.Den
Date 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.


Posted By: Jean
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net