22-04-20, 04:47 PM
جرب هذا الكود
كود :
Dim dgvrRow As DataGridViewRow
Dim tsSum As TimeSpan
Dim tsTemp As TimeSpan
TimeSpan.TryParse("00:00:00", tsSum)
For Each row In datagridview2.rows
strTemp = row.Cells(8).Value.ToString
If strTemp <> String.Empty Then
tsTemp = DateTime.ParseExact(strTemp, "HH,mm,ss", Nothing).TimeOfDay
tsSum = tsSum.Add(tsTemp)
End If
Next
TextBox15.Text = tsSum.toString 
