Hello all,
I am having endless problems with the peice of software i am trying to develop. Firstly I couldn't colour the rows of the datagrid and when i was able to do that I couldn't make it work only for one single row instead it colours the whole datagrid rows.
Anyhow, that is one of the problem. Firstly the major problem is the timer control and the database entry (viewable in datagrid).
I have two fields in the database both as Strings. One is Time In and other is Time Out. Now the Time In field holds the time when the user entered data into the database. The Time Out field is set to 3 hours ahead of the Time In field, that is when the row will turn into yellow (to show that user needs to take some action for that particular job).
Now the question is: How can I setup a timer on DataGridView so that the row will change its colour after 3 hours.
Example:
Time In: 13:00
Time Out: 16:00
Time In field at the time of entry = 13:00, Time Out field at the time of entry=13:00
Datagridview refreshes at the 1000 interval using Timer Control. This refreshes triggers Time Out field to change the time from 13:00 to 13:01..13:30....until 16:00. Now when it hits 30,0000 intervals it changes the colour of the row in the datagridview into yellow.
this process is in loop so the person who makes the entry gets the alerts every 3 hours on the form.
Can someone help me on this issue please or atleast guide me to the right direction?
Many thanks
Regards
J
Edit:
What if I create another database field with the name of Time Counter and set it to integer. This counter should be able to change its values when the datagrid is refreshes and when it reaches 0 the row should colour yellow!
the big question remains the same though, how would I achieve this programmatically.?