LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Move Table Rows ?

Hi

 

Is there any way to change the position of an row in a table ? eg.move row 5 to row 2.

Help share your knowlegde
0 Kudos
Message 1 of 2
(3,116 Views)

Hi shako, I'm not aware of a built-in function do to that, but you could rely on clibpoard to accomplish your task, using ClipboardPutTableVals and ClipboardGetTableVals functions. Look at the attached project: it's a modified version of standard 'tablecells' example in which I have added two buttons for copying and pasting an entire row at the cursor position. The operation is quite simple and it works, but there are some caveats:

 

  1. For some reason ClipboardGetTableVals is not capable to paste data into cells in indicator mode, so I needed to set them as hot before pasting data and restore  the indicator mode after. I don't know whyit happens: it may be the expected behaviour but I rarely used this function so I cannot assure you
  2. You must manually rebuild the list of items in ring cells before pasting data, otherwise they will remain empty


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(3,098 Views)