When i tried the code, the messagebox kept coming up as a row was added. You will need a way to refer to a specific instance like by using .instanceIndex or .instanceManager.count etc. You could even use a variable to count the added instances in your button click code and use that.
I find it handy when debugging to have a message box or textbox that shows hidden information. eg, make your textbox say ,  etc so you know which instance is showing the messagebox until you get the code right.
I am assuming you are already well versed with creating a dynamic table.
The simplest and easiest way to understand it is basically to create an event that interrupts the process of adding a new row. It tests the existing fields and acts based on what it finds.
In your add row button, test if the rawValue is null (empty) for each object in the row. The double ampersand (&&) is logic that will only return a true value if ALL logic tests are true. If just one cell has something in it, the if statement fails and the button will create a new row.
If all cells are empty, the code ends using the end; code. Nothing continues after this
NOTE: This code is only correct for the very first row. As long as the first row has something in it, rows will be created. The code doesnt handle the second instance, third instance and so on. For that, you need to modify the code to handle other instances and add a new if statement for every row you want to have.