Power Table cell value not saving

I have a power table which users enter values and a button component that saves these to a sample. The problems comes when they're on the last cell and click the button. That value in that cell is not saved to the data component and thus not being saved to the sample.

Is there a way to disable the save button until the power table loses focus, or something in that realm. I can tell users to press 'Enter' but we know how that'll end up working.

Try adding self.table.putClientProperty("terminateEditOnFocusLost", True) to the table's initialize extension function.

I had this problem once, and I used the mouseEntered event handler of the save button to commit the edits.

The script looked like this:

# Retrieve the 'Table' component from the window.
table = self.parent.parent.getComponent('Table')

# Access the cell editor of the table.
cellEditor = table.table.cellEditor

# Get the index of the currently selected row and column in the table.
selectedRow = table.selectedRow
selectedColumn = table.selectedColumn

# Get the total number of rows and columns in the table's dataset.
rowCount = table.data.rowCount
columnCount = table.data.columnCount

# Check if the cell editor exists, and if the selected row and column are within valid range.
if cellEditor and 0 <= selectedRow < rowCount and 0 <= selectedColumn < columnCount:

	# Commit the pending edit to the cell using the stopCellEditing method.
	cellEditor.stopCellEditing()

If I recall correctly, I believe I was using a regular table, so I'm not sure this will work as is on a power table.