Hola tengo el siguiente codigo
Pero el valor que devuelve es justo el doble,en realidad cuenta 2 veces cada campo con valores alguna sugerencia? desde ya graciasfor (int rows = 0; rows < dataGridView2.Rows.Count; rows++) { TimeSpan rs1 = new TimeSpan(00, 00, 00); for (int colu = 1; colu < dataGridView2.Rows[rows].Cells.Count; colu++) { if ((dataGridView2.Rows[rows].Cells[colu].Value == null) || (dataGridView2.Rows[rows].Cells[colu].Value.ToString() == "")) { } else {
TimeSpan value =TimeSpan.Parse(dataGridView2.Rows[rows].Cells[colu].Value.ToString()); rs1 = rs1+ value; dataGridView2.Rows[rows].Cells[colIndex].Value = rs1; } } }