Hello all!
I have a power table that should be editable. Although, once I enter a value within a cell in the power table I will press enter and the value will revert to 0. I have 3 other tables that follow the exact flow a s this table, but only this one is giving me issues.
This is the code i have for onCellEdited.
def onCellEdited(self, rowIndex, colIndex, colName, oldValue, newValue):
data = self.data
data = system.dataset.setValue(data, rowIndex, colIndex, newValue)
difference = data.getValueAt(rowIndex, 'Status') - data.getValueAt(rowIndex, 'Goal')
data = system.dataset.setValue(data, rowIndex, 'Behind / Ahead', difference)
self.data = data
This is what I have for the configureHeaderStyle:
def configureHeaderStyle(self, colIndex, colName):
# Example:
from javax.swing import SwingConstants
from java.awt import Color
config = {'foreground': 'black',
'background' : 'lightGray',
'horizontalAlignment': SwingConstants.CENTER}
if colName == 'Mold':
config['background'] = Color(255, 172, 71)
# config['background'] = 'yellow'
return config
This is the table customizer to show I do have it as editable
If I need to give anymore information please do let me know!
Thank you.