0

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
2
Contributors
3
Replies
22
Views
3 Months
Discussion Span
Last Post by rproffitt
0

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.

0

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.

1

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.

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.