Hi,
I am having the follwing code;
Works fine, however, when I click the dropdownlist the combobox (cmbperrname1) I have duplicate values for the selecteditem.Code:Try Dim PeerValue As New System.Data.SqlClient.SqlCommand(("Select PeerRvw From dbo.TblChangeControlDet WHERE ChangeID=@ChangeID"), conn) PeerValue.Parameters.AddWithValue("@ChangeID", txtchangeID.Text) Using Autoreader As System.Data.SqlClient.SqlDataReader = PeerValue.ExecuteReader() While Autoreader.Read() Dim PeerRvw As String = Autoreader.GetValue(0) cmbpeername1.SelectedItem.Text = PeerRvw End While End Using Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Information, "CCMS") End Try
E.g.,
Combobox has 3 values
A
B
C
Results when you select the dropdownlist;
B - Selecteditem
A
B
C
Thanks


Reply With Quote
Bookmarks