I'm having trouble hiding rows with 0
value in DataGridView
.
foreach (DataGridViewRow row in this.taggGrid.Rows)
{
if (Convert.ToString(row.Cells[4].Value).Equals(0))
{
row.Visible = false;
}
}
The row I want to hide still shows.
(Answered by the OP in edits. See Question with no answers, but issue solved in the comments (or extended in chat) )
The OP wrote:
ANSWER: Solved it myself:
foreach (DataGridViewRow dr in taggGrid.Rows)
{
if (dr.Cells[4].Value.ToString() == "False")
{
dr.Visible = false;
}
}