i have a html table where one of the columns is a set of checkboxes
There are three checkboxes in each row. The original names of the checkboxes are
Row 1: person[0].Choices (value=1 name= person[0].Choices value=2 person[0].Choices, etc. .)
Row 2: person[1].Choices(value=1 name= person[1].Choices value=2 person[1].Choices, etc . .)
Row 3: person[2].Choices(value=1 name= person[2].Choices value=2 person[2].Choices, etc . .)
i want to:
- Delete the first row of the html table.
- Rename all of the checkbox indexers so at the end of it, there are two left
Row 1: person[0].Choices (value=1 name= person[0].Choices value=2 person[0].Choices, etc. .)
Row 2: person[1].Choices(value=1 name= person[1].Choices value=2 person[1].Choices, etc . .)
but note that since the first row has been deleted what was checked in Row 2 before is now in Row 1 and what used to be in Row 3 is now in Row 2, etc.
Can this be done through jquery or javascript as i need them to be in consecutive order for the default asp.net mvc binding to work.
EDIT
i found an image that describes what my table looks like to hopefully clarify the point. http://weblogs.asp.net/blogs/psperanza/CheckboxGrid_6F9D4218.png