LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Sort Data by columns in a multicolumn listbox

Solved!
Go to solution
Highlighted

Sort Data by columns in a multicolumn listbox

I have a multi-column listbox on the front panel with columns such as Name, Type, Date Modified, Size.

Is there any way to provide a facility to the user to sort the data in the listbox column-wise during run-time?  It should be similar to the one provided in Windows Explorer wherein the user can sort the data either by Name, Type, Size etc.

 

Thanks

Siddharth

0 Kudos
Message 1 of 10
(4,601 Views)

Re: Sort Data by columns in a multicolumn listbox

HI

 

           This sorting can be done it  in different ways. I have attached a Vi hope this helps you. Here i am sorting the 1st column wrt alphabetical order.

           Let me know if this works.

Message 2 of 10
(4,593 Views)

Re : Sort Data by columns in a multicolumn listbox

Hey,
i think it should be good !
I hope it is what you're looking for !
(Thanks to AutoTEC for sorting a 2D array ! Smiley Happy lool)
Let me know if it helps you !
Best regards, Vincent.
PS. : the Vi is in 8.5. You just have to run, and click on the name of the column you want to sort.
V-F
0 Kudos
Message 3 of 10
(4,580 Views)

Re: Sort Data by columns in a multicolumn listbox

Thanks for your response. I am using Labview 8.2 and hence unable to open the VIs sent by you. Can you please let me know how do I open these Vi's in Labview 8.2.?

 

Thanks,

Siddharth

0 Kudos
Message 4 of 10
(4,560 Views)

Re: Sort Data by columns in a multicolumn listbox

Thanks for your response. I am using Labview 8.2 and hence unable to open the VI sent by you. Can you please let me know how do I open these VI in Labview 8.2.?

 

Thanks,

Siddharth

0 Kudos
Message 5 of 10
(4,557 Views)
Solution
Accepted by topic author Siddharth D
08-27-2015 04:09 PM

Re : Re: Sort Data by columns in a multicolumn listbox

OK,  i joined the vi in Labview 8.0.
Let me know if it works.
Best regards,
V-F
Message 6 of 10
(4,549 Views)

Re: Re : Re: Sort Data by columns in a multicolumn listbox

Thanks for your help. It works!!!!!
0 Kudos
Message 7 of 10
(4,526 Views)

Re: Sort Data by columns in a multicolumn listbox


Siddharth D wrote:

I have a multi-column listbox on the front panel with columns such as Name, Type, Date Modified, Size.

Is there any way to provide a facility to the user to sort the data in the listbox column-wise during run-time?  It should be similar to the one provided in Windows Explorer wherein the user can sort the data either by Name, Type, Size etc.

 

Thanks

Siddharth


Hi Siddharth,

 

Have a look at the attachments & pl reply back if they fir your requirement like a 'T'. Smiley Wink

 

Both are saved for LV 8.0. Smiley Happy

- Partha (CLD until Oct 2021 Smiley Happy)
0 Kudos
Message 8 of 10
(4,498 Views)

Re: Re : Re: Sort Data by columns in a multicolumn listbox

Tried your VI and it only works if there are no identical items in a column and you click on that column.   This is because the search function stops the first time it finds a value.  Identical values will be removed by the sort.

 

Also, the test for greater than or equal 0 means that there will be an already sorted result waiting which will execute next time you click in the main part of the list box (which returns a minus 2).  This test should be made before the sort.

 

Sorry,

 

Carsten

Message 9 of 10
(4,283 Views)

Re: Re : Re: Sort Data by columns in a multicolumn listbox

I know that this is an ancient thread, but I thought I'd add a sorting algorithm that works with data that has duplicates in it. Carsten is correct that a check should be performed before this sort is executed to ensure that the column index is not negative.

0 Kudos
Message 10 of 10
(1,147 Views)