LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make editable Table in LabVIEW

Hi,

Could you please let me know how can I make an editable table. I read all the contents of the table from a spreadsheet file but I would like when I click on any of the entries in the first column I get checkboxs for all the entries in that row and after updating them the table should also automatically be updated with new values

 

For example

 

Let's say this is my table

 

 

 

Device Name        Bit 0           Bit 1                Bit 2                   Bit 3                               Value in binary

 

1                           1.bit0           1.bit1                 1.bit2             1.bit3                                    0000

 

2                            2.bit0           2.bit1                 2.bit2             2.bit3                                    0000

 

3                            3.bit0           3.bit1                 3.bit2             3.bit3                                    0000

 

4                             4.bit0           4.bit1                 4.bit2             4.bit3                                   0000

 

            

Now if the user click on 1, I should see 4 check boxes  for   1bit0           1.bit1                 1.bit2             1.bit3     and as soon as the user update any of them the binary value should be updates . For example if the user   enable 1.bit1 and 1.bit 3 then the binary value should become 0101

 

Could you please let me know if I can I use Table control to do this and how can I do it in LabVIEW

 

Thanks

 

 

 

0 Kudos
Message 1 of 15
(7,504 Views)

Hi tintin,

 

here a different user has a very similar question - and you might take the same route as he is suggested to go...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 15
(7,502 Views)

Thanks Gred

 

So seems like I need use a Table Control . This table can read everything from a spreadsheet file. Then when I click on any of the items in the first column then a list box should apear on top of the table ( containing all the items in that row) and when I chenage the values in that listbox then the table should be updated using events.

 

It looks very complicated. Is there any example or any other suggestions that I can use?

 

Thanks

0 Kudos
Message 3 of 15
(7,486 Views)

What is really important for me is whenever I select any of the rows by mouse I should be able to see check boxes for all the items in the row

 

 

For example if I select     device 2 row  I should be able to see check boxes for bit 0 to 4  and when I check them then the table should be updated. 

0 Kudos
Message 4 of 15
(7,477 Views)

Can anyone share an example how selecting a row in Table control can make an event?

I really appreciate any help

0 Kudos
Message 5 of 15
(7,438 Views)

Hi TinTin,

 

you could use an event structure to capture mouse clicks in the table. With the information provided by the event structure you can determine the activated row/column...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 15
(7,411 Views)

@tintin_99 wrote:

Now if the user click on 1, I should see 4 check boxes  for   1bit0           1.bit1                 1.bit2             1.bit3     and as soon as the user update any of them the binary value should be updates . For example if the user   enable 1.bit1 and 1.bit 3 then the binary value should become 0101


Why does the user even need to select a row first? Wouldnt it be sufficient to have an array of clusters, where each cluster contains a devicename string, four enums with 0,1, and a string for the value (or binary formatted numeric). Elements that don't accept inputs should be disabled, but not greyed and can be recalculated whenever needed.

 

The main problem is the cosmetic fact that this will no longer resemble a table because of all the extra borders...

 

... That's why we have this idea! Go vote for it!! Thanks! 😄

0 Kudos
Message 7 of 15
(7,366 Views)

Hi,

  You can try using check box in multicolumn Listbox since it is possible to insert symbols using ItemSymbols property.

Read the following.

Check box in Multicolumn Listbox

Hope this helps.

Aarthi
0 Kudos
Message 8 of 15
(7,315 Views)

@altenbach wrote:
Why does the user even need to select a row first? Wouldnt it be sufficient to have an array of clusters, where each cluster contains a devicename string, four enums with 0,1, and a string for the value (or binary formatted numeric). Elements that don't accept inputs should be disabled, but not greyed and can be recalculated whenever needed.

 

The main problem is the cosmetic fact that this will no longer resemble a table because of all the extra borders...

 

... That's why we have this idea! Go vote for it!! Thanks! 😄


Here's what I had in mind (LabVIEW 8.2). All you need to add is parsing your input file into the cluster structure. If the number of clusters is large, show the vertical scrollbar of the array.

 

 

 

(...note that it would look much better with my above mentioned idea implemeneted! :D)

 

 

Download All
0 Kudos
Message 9 of 15
(7,306 Views)

I'm a bit slow catching up with this, but how's this for a (nearly) flat table:

 

Flat Table.png

 

 Those frameless Silver controls are actually quite useful, especially as they can be transparent which the System ones can't.

Message 10 of 15
(7,111 Views)