Hello,
I am trying to use the configureCell Extension Function in the Power Table to look at the value of one column and build a drop-down of relevant items in another column based on the first value for each row.
Taking baby steps here as I haven’t ever really gotten into the java swing stuff. I can’t even get the combo box to render correctly and was hoping the fine folks on the forum could point me in the right direction.
The following does put a combo box into my Value column with either Line 1 or Machine 1 being displayed depending on the value of “Parameter” for each row. But when I click on it the combo box goes away and it reverts to a text box. All the Jython examples I’ve found on the web talk about handlers but I’m not even sure you can do that in the power table extension functions. And I don’t think I can use the configureEditor function because I can’t access rowIndex.
Thanks in advance -
[code] from javax.swing import JComboBox
print value
if colName == "Value":
param = self.data.getValueAt(rowIndex,"Parameter")
if param == "Line":
return {'renderer': JComboBox(["Line 1", "Line 2", "Line 3"])}
elif param == "Machine":
return {'renderer': JComboBox(["Machine 1", "Machine 2", "Machine 3"])}[/code]