# Perspective table cell question

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-cell-question/78112>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [August 19, 2023, 7:15pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-question/78112 "2023-08-19T19:15:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kaloyan\_Radomirov](https://avatars.discourse-cdn.com/v4/letter/k/47e85d/32.png) [@Kaloyan\_Radomirov](https://forum.inductiveautomation.com/u/Kaloyan_Radomirov)\
**Post date:** [August 19, 2023, 7:15pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-question/78112/1 "2023-08-19T19:15:01Z")

</div>

Hello everyone,

I'am working on a project with touch screen, barcode and table.  
Barcode input is in a table cell.  
With start Up page event I can select a cell with a script:  
self.getChild(Table).props.selection.selectedColumn = 'barcode'  
self.getChild(Table).props.selection.selectedRow = 0

Can I make this cell also editable for not need to touch the cell?  
(blinking cursor in the cell)

I've already done this with element .focus() with a few labels, but how with tables?

Thanks

---

<div class="post-metadata">

**Author:** ![Joshua\_Benjamin](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@Joshua\_Benjamin](https://forum.inductiveautomation.com/u/Joshua_Benjamin)\
**Post date:** [August 29, 2023, 10:37pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-question/78112/2 "2023-08-29T22:37:09Z")

</div>

Hello Kaloyan,

The table component requires an input to begin editing, this is chosen by the "allowEditOn" property. This property requires a "click" of some sort to edit the cell, as the properties of the table show below.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/a/1accbd940010f4c4079770c9dac7af997468deb2.png)

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [August 30, 2023, 9:25am UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-question/78112/3 "2023-08-30T09:25:33Z")

</div>

here i did something similar to use js injection to click a row

> [@\[Feature-789\] Perspective component extensibility](https://forum.inductiveautomation.com/t/feature-789-perspective-component-extensibility/29459/26):
>
> Someone reminded me of this so i wipped something up [focusRow.zip](https://forum.inductiveautomation.com/uploads/short-url/as3VYUdazbWMcPq4lvM6SM4AfPq.zip) (37.1 KB) had to use html parsing for " (&q uot;) because it was doig annyoing with the escaped characters xd (the disadvantage of parsing a string to js xd) code = """\<img style='display:none' src='/favicon.ico' onload=\" document.querySelector('#"""+value.id+""" [data-row-id=&quot;"""+str(value.number)+"""&quot;]').scrollIntoView(); document.querySelector('#"""+value.id+""" [data-row-id=&quot;"""+str(value.number)+"…

you can add in the column too to select the right column  
(gotta click it twice too for edits)  
something like this in the markdown binding

```auto
	
	code = """<img style='display:none' src='/favicon.ico' onload=\"	
		document.querySelector('#"""+value.id+""" [data-row-id=&quot;"""+str(value.number)+"""&quot;][data-column-id=&quot;"""+str(value.column)+"""&quot;]').scrollIntoView();
		const cell = document.querySelector('#"""+value.id+""" [data-row-id=&quot;"""+str(value.number)+"""&quot;][data-column-id=&quot;"""+str(value.column)+"""&quot;] .content');	
		cell.click();
		cell.click();								
	\"></img>""".replace("\n", "").replace("\t", "")
	return code
		

```

dont let userinput enter these markdown bindings tho, its unsafe

---

<div class="post-metadata">

**Author:** ![Kaloyan\_Radomirov](https://avatars.discourse-cdn.com/v4/letter/k/47e85d/32.png) [@Kaloyan\_Radomirov](https://forum.inductiveautomation.com/u/Kaloyan_Radomirov)\
**Post date:** [August 30, 2023, 2:25pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-question/78112/4 "2023-08-30T14:25:30Z")

</div>

Now I'am using a external input txt element.  
But I will try this.  
Thanks.
