I have trying to filter out data but am having a tough time getting the statement correct.
I have a DataGridView that has several columns. Two of the columns I would like to concatenate but also see if that concatenation exists in a list.
This is the list I want to compare to
List<string> findList = new List<string>{"1A","2A","1B","2B","1C"};
This is the searching I can't get right.
List<string> filteredList = (List<string>)dgvSheet.Rows.OfType<DataGridViewRow>().Any(r => findList.Contains(r.Cells["Priority"].Value.ToString().Concat(r.Cells["Probability"].Value.ToString()).Select( p => p.Cells["RID"].Value.ToString());
I've tried several versions but this one seems to express what I'm trying to do.