0

enter image description here

I need help to this, the situation goes like this. I have a datagridview that consists of emp_Code, date, timeIn and timeOut as shown above. I have the total hours between timeIn and timeOut of row1 and get displayed on a textbox (row1 only because I don't know how to increment index to add row2 to row1 to display it on which textbox). Yes, I know how to get the total hours between timeIn and timeOut. Now, I wanted to know on how to sum up the total hours of every rows and get it displayed on which textbox.

Question Analogy: textbox is already filled with the total hours of row1, I want to know how to go to the next index that their total hours will be summed up and display it on which textbox. Hope that the question is clear.

pruuylan
  • 86
  • 1
  • 1
  • 10
  • you need to show the code. Show your efforts! how did you fill the row1 textbox (total hours of row1) – Waqar Ahmed Oct 12 '15 at 10:17
  • I wanted to, but I don't know how to sir. `DateTime timeIn = Convert.ToDateTime(txtTimeIn.Text); DateTime timeOut = Convert.ToDateTime(txtTimeOut.Text); TimeSpan span = timeOut - timeIn; txtTotalHours.Text = Convert.ToString(span);` this is how I get the total hours of row 1 sir. – pruuylan Oct 12 '15 at 10:25
  • Please don't ask the same question twice. Improve the old one. – Soner Gönül Oct 12 '15 at 10:28
  • @SonerGönül sorry sir – pruuylan Oct 12 '15 at 10:32

0 Answers0