April 19, 2024, 03:17:46 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Sorting problem

Started by Brian, November 14, 2020, 04:51:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

November 14, 2020, 04:51:13 AM Last Edit: November 15, 2020, 03:55:58 AM by Brian
Help - me no understand! Run the program, listview loads up with the contents of 'Dates.txt'

Each column is sortable, but if you click first on the 'Year' column, it doesn't sort. It only sorts if you click on any of the other columns first. Must be a simple solution

Brian

PS: Update attached to last post in this thread

Andy

Brian,

The date code you sent me yesterday works fine in my editor.

The only difference is you are subclassing the listview control, I removed that as I don't need to do that.

Column 1 for me are line numbers, when I click on it, it sorts correctly.

Just noticed this:

Column 1 sort does not work until you have clicked on another column first.
Once you have done that it works.

So that needs looking at...

Andy. 
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

Brian,

Before the WAITUNTIL statement put this:

SortAscDesc = 1

Works now.

 :)
Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Brian

Well done, Andy. Sorted!

Brian

Andy

Your welcome Brian!

It just needed an initial value to begin with.

Anyway, thanks, and it's sorted now.

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Brian

Updated and reposted here with additional calendar icon for you to use

Brian