F
F
FAwafawf12122021-06-17 08:22:46
C++ / C#
FAwafawf1212, 2021-06-17 08:22:46

Alternative to character * for textbox?

I have a text box that searches and displays data in the datagrid, but if I write the letter D, it will only search for the letter D, and the word Dom, derevo, etc. will never show, is there an alternative to this character *? C# WPF visual studio ADO DB SQL
here is the code

private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
        {
            var filter_col = sourceCollection.Where(itemF => itemF.NameComplect == TextPoick.Text);
            DGComplectViev.ItemsSource = filter_col;
            if (TextPoick.Text.Length == 0 )
               DGComplectViev.ItemsSource = sourceCollection;
        }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-06-17
@vabka

it will only search for the letter D, and the word Dom, derevo, etc. will never show

itemF => itemF.NameComplect == TextPoick.Text
Well, as programmed, so be it. Instead of == you can use Contains or regular expressions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question