Goran Bibic

Goran Bibic

  • 478
  • 2.9k
  • 200.8k

Need use LIKE %

May 20 2021 8:50 AM
I use code and work fine
 
  1. var KooperacijaRN = this.radni_nalozi_2018DataGridView.Rows.Cast<DataGridViewRow>().Where(row => row.Cells["R.b. RN"].Value.ToString() == "KO");  
  2.             var childCount4 = KooperacijaRN.Count();  
  3.             this.BlokiraniRNLabel.Text = childCount4.ToString(); 
 Need to change line 1 to be LIKE instead ==
 
  1. var KooperacijaRN = this.radni_nalozi_2018DataGridView.Rows.Cast<DataGridViewRow>().Where(row => row.Cells["R.b. RN"].Value.ToString() LIKE "%KO%");   
 But this dont work
Please help
Thank you
 
 

Answers (4)