4
Answers

help en C#

Photo of dany

dany

11y
1.3k
1
hello,
I want to know how to search in datagridview and only BindingSource, I want when the user starts to enter a word in a TextBox the result shows how to dynamically ing the datagridview!
I tried it but nothing happens!


  private void textBox_search_word_TextChanged(object sender, EventArgs e)
        {
            if (textBox_search_word.Text == string.Empty)
            {
               MyBindingSource.RemoveFilter();
            }
            else
            {
                MyBindingSource.Filter = string.Format("Name LIKE '*{0}*'", textBox_search_word.Text);
                MydataGridView.DataSource = MyBindingSource;
            }

}








Thank you in advance

Answers (4)