Way to customize a column to have check boxes or text in a Power Table

I have a power table that will have two columns that look like the following:

viewedColumn           hiddenColumn
checkBox               NULL
checkbox               NULL
invoice1               invoice1
invoice2               invoice2

My second column will be hidden from user but the data will be used to drive the behavior of the column that is seen. If the value of the second column is NULL, I want to display a checkbox that the user can click in the first column, if the second column has a string value, I want to display that string value (which will not be editable by the user). Is this possible with a power table?

Many things are possible with a power table. In this case you will want to use the configureEditor and configureCell functions to create your own checkbox editor/renderer, respectively. E.G., in configureCell, something like this:

	if colName == "viewedColumn" and self.data.getValueAt(rowIndex, "hiddenColumn") is None:
		from javax.swing import JCheckBox
		return {'renderer': JCheckBox(selected=textValue == "true")}
1 Like