| | |
DataGrid with Timer Control
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
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
| Thread Tools | Search this Thread |
"crystal .net .net2005 2008 access add advanced application array assignment basic beginner box button buttons center click code combo convert cpu cuesent data database datagrid datagridview designer dissertation dissertations dissertationthesis dosconsolevb.net editvb.net employees excel exists firewall forms html image images isnumericfuntioncall listview login map math memory mobile module msaccess mssqlbackend mysql navigate net number opacity open pan pdf picturebox picturebox2 port print printpreview record regex reports" reuse right-to-left save savedialog search serial socket sorting sqldatbase sqlserver storedprocedure string temp textbox timer txttoxmlconverter upload useraccounts usercontol usercontrol vb vb.net vb.nettoolboxvisualbasic2008sidebar vba vbnet vista visual visualbasic visualbasic.net visualstudio.net web wpf wrapingcode xml





