Can't edit within table

I have a table with 2 columns. The first contains a string, the second an integer. The second column is set so values can be edited in the table. I can create new entries in the table by pressing a button, which creates a new dataset based on what is already in the table and what is highlighted in another table.

Editing of the cell works as long as the table initially contains some data. However, if the table is blank and I copy a new entry into it, no editing is possible.

Any ideas?

Can you post a window that demonstrates this behavior? It is important to know that the table stores its column configuration keyed by column name - is your button altering the column names?

It turns out that even if the dataset I was copying to the table was initially empty, I was still writing it to the table (despite it having no rows). This seemed to mess up the data types of the columns and meant the system did not allow editing of the column once data was entered.