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.
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.