Alternative to sort_list

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
User avatar
HMJust
Posts: 51
Joined: Wed May 11, 2016 7:23 pm
Contact:

Alternative to sort_list

Post by HMJust » Tue Jun 13, 2017 8:58 pm

In a Windows application I have a treeview with items. The treeview is sorted on two levels, each on an alphanumeric field.
When the user has selected an item, I want to be able to select the next item (the one below or the one above). As in:

Code: Select all

Treeview and items:
A
B
C
C.1
C.2
C.3
D
D.1
D.2
E
if the user has selected C.2 I want to be able to move that selection to C.3 or C.1. From C.3 I might want to move the selection to D.1, and so on.

This is fairly easy if I know the order the items are displayed in the treeview. But I don't necessarily do that.

The treeview items seem to be sorted differently than the sort_list does. For instance I get this order in the treeview:

Code: Select all

Lok: P31- Ord: 4656
Lok: R10-F3- Ord: 4656
Lok: R12F3- Ord: 46
Lok: R1-F4- Ord: 465
(real data, it makes sense to us)

and this with sort_list:

Code: Select all

Lok: P31- Ord: 4656
Lok: R1-F4- Ord: 465
Lok: R10-F3- Ord: 4656
Lok: R12F3- Ord: 46
Is there a way to have sort_list (or an alternative) sort the same way as the treeview is displayed? Or is there a way to tell the treeview to go to the next (or previous) item?
I don't know what I am doing, nor how I did it. If it works, luck was involved :geek:

kno_dk
Posts: 89
Joined: Tue Feb 23, 2016 12:00 am

Re: Alternative to sort_list

Post by kno_dk » Tue Jun 13, 2017 9:24 pm

Hi
Is it not nearly the same as http://vlforum.lansa.com.au/viewtopic.php?f=3&t=1380

/klaus

User avatar
HMJust
Posts: 51
Joined: Wed May 11, 2016 7:23 pm
Contact:

Re: Alternative to sort_list

Post by HMJust » Tue Jun 13, 2017 9:32 pm

No, I don't think so. That thread was AFAIK about controlling the displayed sorting. We are happy with the sorting as it is displayed but we are having trouble navigating that sort.
I don't know what I am doing, nor how I did it. If it works, luck was involved :geek:

Post Reply