Goran Bibic

Goran Bibic

  • 479
  • 2.9k
  • 197.9k

Search Two words in datagrid c#

Jul 29 2020 4:32 AM
Search Two words in datagrid c#
 
Need to search two word in datagrid 
Example with some aditional character (exp %)
 
%AC%MILAN%FOOTBAL%
 
Need help
 
My actual code is:
  1. private void SearchListTextBox_TextChanged(object sender, EventArgs e)  
  2. {  
  3.     (MagacinDataGridView.DataSource as DataTable).DefaultView.RowFilter = string.Format("naziv LIKE '%{0}%'", SearchListTextBox.Text);
  4.     countRowsLabel.Text = "Ukupno redova: " + MagacinDataGridView.RowCount.ToString();  
  5. }

Answers (2)