In my application I have anumber of Answers Textbox. When the user selects all of the buttons by clicking on the "Select All Answers" button, it will automatically display a number in the textbox counting up all of the selected buttons (all the buttons turn green. But I have a problem which can be seen easily if you follow the steps below:
Follow steps below in my jsfiddle:
1. Open the Grid and select option "5". Buttons A to E would appear. Number 5 is displayed in the number of answers textbox which is correct.
2. Click "Select All Answers" buttons. All buttons A to E would be selected (turn green) and the "Number of Answers" textbox would display the number 5.
3. Click the "Add question" button, your details are added into a new row below.
4. Now go back to the top control and Open the Grid again and select option "3". As you can see buttons A to C would appear and are all selected (turn green). Yet the textbox displays the number 8. This should display number 3 as three buttons in the top control are selected. The reason it is displaying 8 is because it is counting of all of the green selected buttons from the top control and the row added. They should be seperated so that if all buttons are selected from top, it should only count up all the selected buttons in the top control only and not any of the buttons in the added rows.
This line of code you need to look at is below
code in jsfiddle, click here