ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best way to allow the user to edit table column/row headings?

I have a table that the user gets to "build" by adding rows and columns and then filling in the cells with data.  Suppose he makes a mistake when he enters the name of a column, and wants to change/edit it.  I can't find a way to make the row/column headings editable.  I can create a custom menu item for the right-click event which can bring up a list of column headings, and then he can select the one to change and hit ok.  But this seems clunky.  Any suggestions ?

Thank you,
Meg
meg@photon-machines.com
0 Kudos
Message 1 of 3
(3,332 Views)

Hi Meg,

I actually believe your method is quite reasonable and professional.

Nevertheless, because the headings are essentially button controls and not textboxes, you must make use of SetTableRowAttribute or SetTableColumnAttribute to modify the rows or columns, respectively. Attached is an example I created to modify the labels by left-clicking on the labels. A message pop-up appears prompting for the new label. I make use of EVENT_TABLE_ROW_COL_LABEL_CLICK to get the column or row of interest.

Hope this helps Meg!

Nestor
Message 2 of 3
(3,304 Views)

Thank you, Nestor.  I'm glad I was on the right track, and I will have a look at your example.  I appreciate your help !

Sincerely,

Meg

meg@photon-machines.com

0 Kudos
Message 3 of 3
(3,289 Views)