Power Table Column Drop Down Query Using configureEditor Extension Function

How do you setup a drop down in a column and get the data for the drop down in a database table.

I see the example in configureEditor but I am not for sure on the query side of it to make it work.

this is what I have tried but with no luck.

if colName == 'Problem Area':
		query ="SELECT DISTINCT ['Descr'] FROM Problem WHERE Type = 'WW' and DelFlg ='0' ORDER BY Descr ASC"
		res = system.db.runQuery (query,'?')
		dlist=[]

Has any one configured the power table to do a drop down query?

You should not run a (by comparison) slow operation like a query directly inside the configureCell function. Run the query somewhere else on the client, then in the script simply limit the results. Check this post for more information on how to do that (note that it's a fairly high-level scripting solution):

I used your example and got it to work but I can not change the data in column 2 manually. How do I get around that?

Before the line:
return comp
add:
comp.setEditable(True)

I tried it but it didn’t fix the issue. It still acts the same

Is there a solution to be able to edit the column that doesn’t have the drop down?