you can take the idea to add the code, to your class.
Dim intLastIndex As Integer
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If Not AllowChangeIndex() Then
CType(sender, ComboBox).SelectedIndex = intLastIndex
End If
intLastIndex = CType(sender, ComboBox).SelectedIndex
End Sub
'You could also use a variable as a flag that indicates
'if the user can or not change the item
Private Function AllowChangeIndex() As Boolean
'Code to allow or not change the index
Return False
End Function
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only