Options and buttons not quite working correctly in jquery

In my jsfiddle I have an application where the user can select an option and their answers and then display it in a new row. I have one slight problem though, I think it will be easier to explain if you follow the steps below in my fiddle:

  1. Open the grid and select option “3”. “3” would be displayed in the textbox and buttons “A” to “C” would appear

  2. Click on “Add Question” button. This would create a new row showing the details you have submitted.

  3. Now click on the “Open Grid” WITHIN THE ROW you have justmcreated and select option “5”. Now the textbox within the row changes the value from “3” to “5” but if you look at the top where you first chose your options and answers, it displays 5 buttons from “A” to “E”.

This should not happen. This should stay to what it was previously which was buttons “A” to “C”. it should only change if the option is chosen from the Option Type at the top and not within the row.

So how can this be fixed? Please use the fiddle to test your ideas if it helps you.

Thank you

The open grid button within the row could call a function whose purpose is to create the buttons. It would only create buttons up to the max allowed, in your case, 3.