Creating an IF statement for datagrid value
- by EvanRyan
This is something I thought would be easier than it's turning out to be.  For whatever reason, I can't seem to figure out a way to make what I'm trying to do here work with an If statement:
  List<int> miscTimes = new List<int>();
            for (int i = 0; i < MISCdataGridView1.RowCount; i++)
            {
                if (MISCdataGridView1.Rows[i].Cells[2].Value == "Something")
                {
                    miscTimes.Add(Convert.ToInt32(MISCdataGridView1.Rows[i].Cells[3].Value));
                }
            }
            return miscTimes;
For some reason, I can't get it to like anything I do with the if statement.  I've tried converting to string and all of that.  How should I go about this?