[SOLVED] Example for combobox with datasource

Answered Closed
0
0

Hi,

Would it be possible to provide an example, of a combobox that has values, and it completes the text when i’m typing?
In VB.NET please,

Thanks in advanced,

  • You must to post comments
Best Answer
0
0

Hi Jorge,

for the ComboBox populated from a DataSource you can use any WinForms sample like this one:

http://vb.net-informations.com/dataset/bind-combobox.htm

For Autocompletion you could then take a look at the various AutoCompleteMode settings.

Best regards
Frank

  • You must to post comments
0
0

Hi,

Oh nice!
Tell me, i’d like that, when i write, it auto-suggest me what it has filled, that part isn’t working, am i doing something wrong?

Sql = “select * from tab_fabricantes order by codigo”

cb_fabricantes.DataSource = SqlDataTable(Sql) ‘ <= this returns a datatable
cb_fabricantes.ValueMember = “codigo”
cb_fabricantes.DisplayMember = “descricao”
cb_fabricantes.SelectedIndex = -1

  • Luca (ITG)
    Set the AutoCompleteMode to one you like to use.
  • Jorge Bastos
    Ah, perfect, dumb me! Thanks Luca,
  • You must to post comments
Showing 2 results