| | |
DataGrid with Timer Control
Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Aug 2007
Posts: 16
Reputation:
Solved Threads: 0
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.?
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.?
Last edited by jaytheguru; Jun 19th, 2008 at 11:07 am. Reason: One Possibility came into my head!
![]() |
Other Threads in the VB.NET Forum
- Previous Thread: Loading media into Windows Media Player 10
- Next Thread: Hello Urgent
Views: 947 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net .net2008 2005 2008 access account application array arrays basic bing button buttons c# center check checkbox code convert crystalreport data database datagrid datagridview date design designer dissertation dissertations dropdownlist excel fade file-dialog filter ftp generatetags google gridview hardcopy images inline input insert installer intel internet listview mobile monitor net networking objects output panel passingparameters picturebox port position print printing problem read remove save searchbox searchvb.net select serial shutdown soap sorting studio survey table tcp temperature text textbox time timer timespan toolbox trim update user validation vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet visual visualbasic visualbasic.net visualstudio2008 web webbrowser winforms wpf year





