|
-
Feb 11th, 2000, 04:13 AM
#1
Thread Starter
New Member
sorted property. In my listbox I have two entries, filename and filedate. I want the user to be able to click on filename or filedate and the contents of the listbox will be resorted depending on the button they click on.
Thanks.
-
Feb 11th, 2000, 08:36 AM
#2
Hyperactive Member
If you are using a recordset to fill your listbox then you could just add an 'Order By' clause to your select statement and refill your listbox with the new recordset.
ie.
If the user selects 'Filedate' you can then fire off a SQL statement such as
SELECT filename, filedate FROM filestable ORDER BY filedate
then refill the listbox
-
Feb 13th, 2000, 09:21 PM
#3
Thread Starter
New Member
I'm not using a recordset, I'm filling my listbox with the filename and filedate from a specified directory. I need to be able to sort the listbox either by filename or by filedate.
Any ideas?
***************************************
Originally posted by Bigley:
If you are using a recordset to fill your listbox then you could just add an 'Order By' clause to your select statement and refill your listbox with the new recordset.
ie.
If the user selects 'Filedate' you can then fire off a SQL statement such as
SELECT filename, filedate FROM filestable ORDER BY filedate
then refill the listbox
-
Feb 14th, 2000, 12:27 PM
#4
I think this is what you are looking for:
<A HREF="http://www.mvps.org/vbnet/code/callback/lvsortcallback.htm" TARGET=_blank>
Sorting ListView ListItems Using Callbacks
</A>
------------------
Vincent van den Braken
EMail: [email protected]
ICQ: 15440110
Homepage: http://www.azzmodan.demon.nl
[This message has been edited by Azzmodan (edited 02-14-2000).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|