G
Guest
Hey guys,
Here is what I am trying to achieve:
I have a grid, and every once in a while the grid will receive a message to
add a new row and highlight it (change the backcolor) for five minutes.
After the five minutes has passed, unhighlight it. The grid needs to
highlight any rows that have arrived in the last five minutes.
Here is how I handle this now. Each row has a value indicating its arrival
time and I have a timer that ticks every 10 seconds. On the timer tick
event, I go through every row in the grid and check if it is highlighted. If
it is, I compare its arrival time to the current time and if the difference
is >= five minutes, I unhighlight it.
I would like the highlighting and unhighlighting to occur as accurately as
possible but ticking every second instead of 10 (or any other higher value)
would loop through all of the rows in the grid every second and that would be
slow since the number of rows may be high.
Does anyone have any other possible suggestions as to how to handle this
scenario?
It would be great if each row can monitor itself and then unhighlight itself
after five minutes but I'm not sure if that is possible.
Thanks for the help,
-Flack
Here is what I am trying to achieve:
I have a grid, and every once in a while the grid will receive a message to
add a new row and highlight it (change the backcolor) for five minutes.
After the five minutes has passed, unhighlight it. The grid needs to
highlight any rows that have arrived in the last five minutes.
Here is how I handle this now. Each row has a value indicating its arrival
time and I have a timer that ticks every 10 seconds. On the timer tick
event, I go through every row in the grid and check if it is highlighted. If
it is, I compare its arrival time to the current time and if the difference
is >= five minutes, I unhighlight it.
I would like the highlighting and unhighlighting to occur as accurately as
possible but ticking every second instead of 10 (or any other higher value)
would loop through all of the rows in the grid every second and that would be
slow since the number of rows may be high.
Does anyone have any other possible suggestions as to how to handle this
scenario?
It would be great if each row can monitor itself and then unhighlight itself
after five minutes but I'm not sure if that is possible.
Thanks for the help,
-Flack