Edit table cell with results from pop up window

I am wanting to allow a user to click in a cell of a table which will open a pop-up window. In the pop up window, the user will select some items that will build a string. I want that string to populate the cell on the original table that is selected. How can I do that? I am using Ignition 7.9.6.

What you need is a custom cell editor for your column. This search will take you to a number of discussions of the various techniques available.

Enclosed is an example using a popup window that will write back to the originating row in another row. If you double click the “String Column”, it will open a popup window, passing in the clicked row and column indexes, as well as the window name and the path to the table component. All the magic happens in the onDoubleClick event on the table, and on the submit button on the popup. This is a way to solve this issue in the most basic way, without needing to understand java. Let me know if you have any questions.

demo_2018-05-04_0206_partial.proj (34.0 KB)

2 Likes

Thanks for the help. I will take a look at this and get it to work.

Worked like a charm. Thank you very much for your assistance.

Kyle, that was a great example. Thank you for sharing it. I want to use it to edit a table on a tablet since it is hard to use a dropdown list on a tablet.

The power table data is bound to an SQL query. I have an SQL update script on the powertable’s onCellEdited event. Whenever i use the popup window to update a cell in the table, i press submit and it will put the text in the cell but seconds later it reverts back to the previous value. Does anyone know why it keeps doing this?

If I don’t use the popup window and just double click to edit the cell it works.

Anyone able to provide any help with this? I am still stumped.

The onCellEdited isn’t being fired.
I would pass the record ID to the popup and then run the update query there.
Then on close of the popup refresh the datasource of the table.