SteveoAtilla
Well-known member
Hey,
I have a dropdown list on a form that is behaving in a very bizzare fashion. Here is the behavior:
List is loaded with text and values via a loop, not bound to a data source.
List has multiple values, and an OnIndexChanged event (yes, it is AutoPostBack True).
I can select (in one example with seven elements) any of the first five values (Indexes 0 thru 4), but when I select either indexes five or six, the IndexChanged event never fires.
Further, when I start from index 3, for example, and choose the sixth element (index 5) from the list, the Text, Value and Index for the dropdown list are FOR THE FIFTH ITEM IN THE LIST (Index 4). Same thing happens with the last element.
What would cause this?
Here is the SelectedIndexChanged code:
What could there possibly be in the code to cause this type of behavior? I have debugged the code by putting a stop in immediately in the procedure, and the values are as listed above.
Has anyone ever seen this before????
I have a dropdown list on a form that is behaving in a very bizzare fashion. Here is the behavior:
List is loaded with text and values via a loop, not bound to a data source.
List has multiple values, and an OnIndexChanged event (yes, it is AutoPostBack True).
I can select (in one example with seven elements) any of the first five values (Indexes 0 thru 4), but when I select either indexes five or six, the IndexChanged event never fires.
Further, when I start from index 3, for example, and choose the sixth element (index 5) from the list, the Text, Value and Index for the dropdown list are FOR THE FIFTH ITEM IN THE LIST (Index 4). Same thing happens with the last element.
What would cause this?
Here is the SelectedIndexChanged code:
Code:
Private Sub selPartsList_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles selPartsList.SelectedIndexChanged
Dim SelText As String = selPartsList.SelectedItem.Text
Dim SelValue As String = selPartsList.SelectedValue.ToString
Dim SelIndex As Integer = selPartsList.SelectedIndex
ResetDataEntryForm()
Session("ShowHide") = "Show"
cmdPartStatus.Text = "Show Part Detail"
Session("PartDetailBOMPK") = selPartsList.SelectedItem.Value
lstPartDetail.Items.Clear()
lstPartDetail.Visible = False
selPartsList.SelectedIndex = SelIndex
End Sub
What could there possibly be in the code to cause this type of behavior? I have debugged the code by putting a stop in immediately in the procedure, and the values are as listed above.
Has anyone ever seen this before????