12-20-2011 08:44 AM
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,
12-20-2011 09:03 AM
12-20-2011 09:10 AM
12-20-2011 09:48 AM
Looks good, only missing the logic for the table data itself. See attached...
12-20-2011 09:53 AM
Hi Philip,
Thanks for adding that, very useful . 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?
12-20-2011 10:09 AM
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.
12-20-2011 10:13 AM
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!