foreach (DataGridViewRow dr in CustOrdersDGV.Rows) { if (dr.Cells[6].Value.ToString() == "hot") { dr.Visible = false; } }
<pre> foreach (DataGridViewRow dr in CustOrdersDGV.Rows) { if (dr.Cells.Count > 6) // validate the index if (dr.Rows[6].Value.ToString() == "hot") { dr.Visible = false; } }
if (dr.Cells[6].Value.ToString().ToLower().Contains("hot")) { dr.Visible = false; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)