LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Editable table column ordering

Before I embark on a lengthy process of handling drag and drop events, I thought I'd ask the collective knowledge if there was an easy way to create a table in which the operator can modify the order of the columns? I want the operator to be able to reorder the columns, ideally by selecting a column header and dragging it left and right to move its position relative to its neighbours.

 

Thanks in advance,

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 1 of 7
(2,563 Views)

In the interests of sharing, here is what I have so far (didn't take so long to code afterall).

 

I'd still prefer some native functionality though if anyone knows if it can be configured?

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 2 of 7
(2,557 Views)

Slight bug fix for handling movements to last place (previously lost the entry)

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 3 of 7
(2,553 Views)

Looks good, only missing the logic for the table data itself. See attached...

 

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

Message 4 of 7
(2,550 Views)

Hi Philip,


Thanks for adding that, very useful Smiley Happy. My example was an experiment, I was looking for something that could prove I could rearrange the column headers. In my actual implementation I will instead modify an array of indices which will be used elsewhere to populate the table more completely.


I take it you know of no native way to achieve this with LabVIEW controls only?

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 5 of 7
(2,546 Views)

No way that I know of. I'm working on a project that is mostly database driven where I need to also sort by column and optionally edit in place.

 

I'm beginning to think that a commercial .NET control will be easier than trying to recreate all the functionality in LV. 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 6 of 7
(2,544 Views)

That sounds tough. For cases where I need to edit in place with limitations, I usually enforce a borderless VI to appear right over the cell when a mouse down is recognised, resized to match the cell size with only a single control in, set to fit to pane. The VI is picked from a library of VIs, each with a different type of control in it - list, string, checkbox, value etc. When you press return (etc.), the VI closes itself and passes the new data back to the table for integration. Not fun, usually a bit clumsy, but gets the job done.

 

A dedicated .NET control may a very good idea!

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 7 of 7
(2,542 Views)