If the user selects the option True or False and adds it into a new row, it displays a textbox with the value 1, it should instead display a string stating "Only 1 Answer" with a hidden textbox that contains the value 1.
I don't know why it is doing this. The other options 3, 4 and 5 will display a textbox for Number of Answers but True or False should display "Only 1 Answer" in the new added row.
Follow the steps below in my fiddle to use the application and to test your code in the application:
Step 1: Open the grid and select option 3. Below the option textbox it will display a textbox with the number 0 in it.
Step 2: Click on the "Add Question" button, this will add the details from the top into a new row below. As you can see under the "Number of Answers" column in you new row it displays the textbox with the value 0 from above.
Step 3. Now go back to the top control and open the grid again but this time select the option "True or False". You will see below it displays the string "Only 1 Answer"
Step 4: Now click on "Add Question". This is where the problem occurs. It will add a new row but instead of displaying "Only 1 Answer" under the "Number of Answer" column within the row you
have just added, it displays a textbox with the value 1. This is incorrect, it should display the string "Only 1 Answer" and there should be a hidden textbox which contains the value 1.
Can anyone solve this problem? Please use the fiddle to test my code and to show a working example.
Code in jsfiddle, click here