Controls in a table row

Is it possible to add a control like a checkbox to rows of a table. Let’s say i have a table with a list of lights with columns name, on/off status. Is it possible to add a checkbox under on/off status and turn the lights ON or OFF from there?

Do you mean add a checkbox as field content as below?
image

If it’s a yes, please customize your column as boolean.

1 Like

Capture
I added it but I am not able to check/uncheck it.

  1. Make the column editable.
  2. Then uncomment the code in the onCellEdited extension function.
1 Like

Can’t find any of those. TO be clear I am talking about perspective.

For perspective, you will have to go in and declare all of your columns in the ‘column’ property. Once you have that you can enable or disable the editable property by column. This will allow you to make changes to the column.

image

You still will need to do setup some scripting to save the changes to the dataset. Likely using the ‘onEditCellCommit’ event, but I haven’t gotten to that yet in perspective, so I don’t have an example to provide.

Edit: Looks like the manual has a basic example to take a look at under that event.
https://docs.inductiveautomation.com/display/DOC80/Perspective+-+Table