ReorderList Delete problems in ASP.Net and VB
Posted on 2008-11-18
I have a working ReorderList on one of my webpages that displays questions in a survey. The item template contains two labels, one for the QuestionNumber (which is also the SortOrderField specified in the ReorderList control), and the QuestionText. I can reorder and insert items with no problems -- those features are functioning as expected.
However, when I implement the Delete functionality, it does delete a question, but it doesn't renumber the QuestionNumber. For example, if I have 4 questions (with question numbers 1 thru 4), and I delete question 2, I'm left with the question numbers 1, 3, and 4. This is probably by design, but does anyone know of any easy way to automatically renumber the items so that they would be 1, 2, and 3 instead of 1, 3, and 4? I noticed that if I start dragging and dropping the remaining questions, they will eventually get reordered the way that they should be, but the user isn't going to want to do that.