Hi there.
I was trying to filter items in combobox using BindingSource.Filter, to filter after "гр." and "с." ,but typing in combo it recieve only one letter
and mouse disapear...
Any help pls.
This is my lazy try:

Private Sub Combo11_TextChanged(sender As Object, e As EventArgs) Handles Combo11.TextChanged
    If Me.Combo11.Text <> "" Then
        Me.Selista2BindingSource.Filter = String.Format("SelisteIme Like 'гр.{0}%' OR SelisteIme Like 'с.{1}%'", _
        Combo11.Text, Combo11.Text)
        Combo11.DroppedDown = True
        Combo11.SelectedIndex = -1
    End If
End Sub

Recommended Answers

All 3 Replies

Can you clarify what line 3 is?
I get the Me but what is Selista2BindingSource? It's not a stock thing in VB.net so tell more.

Hi,
Me.Selista2BindingSource is my bindingsource and selista2 is my table from the Database.
So using bindingsource.filter I was sorting the items in the combobox while user typing in there.
Hope that clarify Your Q.

I don't see enough to give you a straight answer so I'll write you should use VS's debugging tools and break on line 5 or 6 so you can examine what text came back.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.