Textbox does not show duplicate values

  • Thread starter Thread starter JohnPapa05
  • Start date Start date
J

JohnPapa05

Guest
I store data in colgName and populate a textbox with

.AutoCompleteCustomSource = colgName

shown below. The problem is that the list does not show the duplicate values. Is there a way tos how the duplicate values in the list?


Public colgName As New AutoCompleteStringCollection()



Private Sub dgvAppointment_EditingControlShowing(sender As Object, e As DataGridViewEditingControlShowingEventArgs) Handles dgvAppointment.EditingControlShowing



If dgvAppointment.CurrentCell.ColumnIndex = DFN_GRID_intPatientID_COL Then

DirectCast(e.Control, TextBox).CharacterCasing = CharacterCasing.Upper



With DirectCast(e.Control, TextBox)

.AutoCompleteMode = AutoCompleteMode.SuggestAppend

.AutoCompleteSource = AutoCompleteSource.CustomSource

.AutoCompleteCustomSource = colgName

End With

Else

If TypeOf (dgvAppointment.EditingControl) Is TextBox Then

With DirectCast(e.Control, TextBox)

.AutoCompleteMode = AutoCompleteMode.None

End With

End If

End If



End Sub

Continue reading...
 
Back
Top