ผมทำ Auto AutoComplete ได้แล้วแต่อยากให้เวลาเลือก ให้แสดง ข้อมูล ไปยังอีก textbox อัครับ
Code (VB.NET)
Dim cmd As MySqlCommand = Me.Cmd
cmd.CommandType = CommandType.Text
cmd.Parameters.Clear()
cmd.Connection = Me.Conn
cmd.CommandText = "Select * From bom_item "
Me.Dr = cmd.ExecuteReader
Dim autoComp As New AutoCompleteStringCollection()
Dim Description As New AutoCompleteStringCollection()
Dim Type As New AutoCompleteStringCollection()
While Me.Dr.Read()
autoComp.Add(CStr(Me.Dr("Code")))
End While
cbx_code_bom_item.AutoCompleteMode = AutoCompleteMode.Suggest
cbx_code_bom_item.AutoCompleteSource = AutoCompleteSource.CustomSource
cbx_code_bom_item.AutoCompleteCustomSource = autoComp
Me.Dr.Close()