# Power Table with three dropdowns

**URL:** <https://forum.inductiveautomation.com/t/power-table-with-three-dropdowns/33874>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [April 12, 2020, 4:36pm UTC](https://forum.inductiveautomation.com/t/power-table-with-three-dropdowns/33874 "2020-04-12T16:36:50Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![DavidWisely](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davidwisely/32/10482_2.png) [@DavidWisely](https://forum.inductiveautomation.com/u/DavidWisely)\
**Post date:** [April 13, 2020, 8:33am UTC](https://forum.inductiveautomation.com/t/power-table-with-three-dropdowns/33874/5 "2020-04-13T08:33:04Z")

</div>

Oh yes, I see the problem.

You could create a custom editor.  
Paste this into the configureEditor and adjust as needed:

```auto
	from javax.swing import AbstractCellEditor,JComboBox, JTextField
	from javax.swing.table import TableCellEditor

	class myTableCellEditor(TableCellEditor, AbstractCellEditor):	
	
		def __init__ (self, tableComponent):
			self.table= tableComponent
			self.editor = None
			
		
		def getTableCellEditorComponent(self, table, value, isSelected, rowIndex, vColIndex):	
			
			if rowIndex in [23, 25, 26]:
				self.editor = JComboBox(["Line 1", "Line 2", "Line 3"])
			else:
				self.editor = JTextField()
	
			return self.editor
		
		def getCellEditorValue(self):
			if type(self.editor) is JComboBox:
				newValue = self.editor.getSelectedItem() 
			else:
				newValue = self.editor.getText()
		
			return newValue
			
	if colName == "Vrednost":
		m = myTableCellEditor(self)
		return {"editor":m}

```

I got the idea from here:

> [@Dynamic drop down values in table](http://forum.inductiveautomation.com/t/dynamic-drop-down-values-in-table/12354):
>
> Create a power table with test data and paste the following into the configureEditor extension function. Make the String Column editable. [code] from javax.swing import AbstractCellEditor,JComboBox from javax.swing.table import TableCellEditor class myTableCellEditor(TableCellEditor,AbstractCellEditor): def \_\_init\_\_(self, tableComponent): self.table= tableComponent self.cbValues = None def getTableCellEditorComponent(self, table, value, isSelected, rowIndex, vColIndex): # Conten…

---

_[View the full topic](https://forum.inductiveautomation.com/t/power-table-with-three-dropdowns/33874)._
