# Controls in a table row

**URL:** <https://forum.inductiveautomation.com/t/controls-in-a-table-row/29232>\
**Category:** Ignition\
**Created:** [October 21, 2019, 7:51am UTC](https://forum.inductiveautomation.com/t/controls-in-a-table-row/29232 "2019-10-21T07:51:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sac](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sac/32/11370_2.png) [@sac](https://forum.inductiveautomation.com/u/sac)\
**Post date:** [October 21, 2019, 7:51am UTC](https://forum.inductiveautomation.com/t/controls-in-a-table-row/29232/1 "2019-10-21T07:51:18Z")

</div>

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?**

---

<div class="post-metadata">

**Author:** ![weixionglichina](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weixionglichina/32/10650_2.png) [@weixionglichina](https://forum.inductiveautomation.com/u/weixionglichina)\
**Post date:** [October 21, 2019, 8:37am UTC](https://forum.inductiveautomation.com/t/controls-in-a-table-row/29232/2 "2019-10-21T08:37:21Z")

</div>

Do you mean add a checkbox as field content as below?  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/2/271bdd6d516cc27111f10bd25a549b130ef8d7df.png)

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

---

<div class="post-metadata">

**Author:** ![sac](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sac/32/11370_2.png) [@sac](https://forum.inductiveautomation.com/u/sac)\
**Post date:** [October 21, 2019, 9:18am UTC](https://forum.inductiveautomation.com/t/controls-in-a-table-row/29232/3 "2019-10-21T09:18:29Z")

</div>

![Capture](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/41a232b5999c52ab0a277273688f0deef2feb0cb.jpeg)  
I added it but I am not able to check/uncheck it.

---

<div class="post-metadata">

**Author:** ![weixionglichina](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weixionglichina/32/10650_2.png) [@weixionglichina](https://forum.inductiveautomation.com/u/weixionglichina)\
**Post date:** [October 21, 2019, 9:31am UTC](https://forum.inductiveautomation.com/t/controls-in-a-table-row/29232/4 "2019-10-21T09:31:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sac](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sac/32/11370_2.png) [@sac](https://forum.inductiveautomation.com/u/sac)\
**Post date:** [October 21, 2019, 1:56pm UTC](https://forum.inductiveautomation.com/t/controls-in-a-table-row/29232/5 "2019-10-21T13:56:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [October 21, 2019, 2:06pm UTC](https://forum.inductiveautomation.com/t/controls-in-a-table-row/29232/6 "2019-10-21T14:06:32Z")

</div>

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](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/a0f8932303240f385a5d8d571a2bcb38e7f23fef.png)

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](https://docs.inductiveautomation.com/display/DOC80/Perspective+-+Table)
