InfoTechEE
asked on
C# DataGridViewRow
I am trying to see if a cell inside my DataGridViewRow contains a certain word -- "TFT".
if (row.Cells["Case Name"].Value.Equals("TFT") ) // works great at checking if it equals the word I'm looking for, but I need to check for "contains" not "equals". How would I go about doing that?
The equivalent of what I'm looking for in SQL would be: WHERE CaseName like '%TFT%'
if (row.Cells["Case Name"].Value.Equals("TFT")
The equivalent of what I'm looking for in SQL would be: WHERE CaseName like '%TFT%'
ASKER
It says object does not contain a definition for Contains. Also, I don't see it as an option after:
if (row.Cells["Case Name"].Value.
if (row.Cells["Case Name"].Value.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try like this
Open in new window