I have a table filled from an SQL query with an added column containing an embedded view with a details button on each row. I'd like it to launch a popup when I click the button that passes the MachineID from the table to the popup, so it can run a "machine details" query for the popup table.
That's mostly working, but the problem I'm having is that for the MachineID to get passed to the popup view, I need to select a row first by clicking the row. Unfortunately clicking the details button on the row does not seem to select the row in time for it to get passed to the view. (The parameter that ends up getting passed is the second most recent row the button has been clicked on).
Here's a screenshot of the parent table with the Details button that launches the popup view.
(The MachineID I added on the details column I added for troubleshooting, it shows value that has been passed to the embedded view containing the Details button).
Here's how that view is launched:
Some ideas I've tried to fix this:
- Adding a sleep for 1 second script in the button events before the popup action.
- Have tried adding the popup action on both onClick and onMouseUp, but result is the same.
Maybe there's a way to select a row on the parent table on mouseover instead of on click?
Any other way I can change this so that a single click on the details button is associated to the proper row?