Perspective Table column render to view must set Field?

Perspective Table, I want to add a column to show icon, then click open a popup.

I set the column render to view, then set viewpath, but I find I must set the Field of the column.

So I have to add a field to the column.

Is there any other function, I needn't add in sql of id as edit ,this field to the column?
sqlStr='''select id,pno,startDT,endDT,processname,id as edit from pc order by id desc limit 1000'''

You could take the dataset output from your query and add a column of blank values to create a new dataset to feed your table. Although if this is just a dummy column where the values don't matter then I can't see any issue with the method you are already using.

I'm wondering why you are doing this in a message handler? You should make this query a named query and use a named query binding on your table. The message handler script should just be triggering a .refreshBinding on the table.

Because when I edit the result, I have to select again.
So I set it in message handler.

message handler

	# add edit , annatation column 
	colCount_editCol = table.getColumnCount()
	columnName_editCol = "editCol"
	columnData_editCol = []
	for i in range(table.getRowCount()):
		columnData_editCol.append(i)
	dataset_editCol = system.dataset.addColumn(table, colCount_editCol, columnData_editCol, columnName_editCol, int)
	
	colCount_noteCol = dataset_editCol.getColumnCount()
	columnName_noteCol = "noteCol"
	columnData_noteCol = []
	for i in range(dataset_editCol.getRowCount()):
		columnData_noteCol.append(i)
	dataset_noteCol = system.dataset.addColumn(dataset_editCol, colCount_noteCol, columnData_noteCol, columnName_noteCol, int)
	
	self.props.data=dataset_noteCol

Even though they are useless columns, I have to add them.
Then I set columns -Field to them.
I'm not sure is there other good advice?

If you want the edit and note buttons embedded in the table then yes the table dataset needs to have those columns.

Instead of having them embedded in the table you could have those buttons outside the table. Select a row in the table before clicking one of the buttons and pass in the data from the selected table row into the button action.

But I didn't find the Row Select Events?

you can see if there is something selected, you can use this value for your button external button