Do you use DataGrid2 to display the tables? If you mark the column with the button as ‘Custom Content’ you can now add the button to the column.
In this field you can now add a DataView widget to retrieve the Master table.
In this DataView you can add a button and configure the visibility as you wish.