Im using a timer to update a DataGridView to reload the datas in case there is an update in them (datas deleted or added). I want to add a column that have a timer "Time until" that uses a HH:MM:SS format that could change with my timer. Any idea on what would be the best way to acheive it?
Asked
Active
Viewed 268 times
0
-
Just to be sure: you wan't to have a timer in your datagrid which is getting update every second? – Mighty Badaboom Mar 22 '17 at 14:29
-
not really clear what the end result shall look like?=! what do you want to display at each item in this column? the time of change? or do you want to have a constantly ticking watch for every item in your `DataGridView` ? – Mong Zhu Mar 22 '17 at 14:30
-
Wouldn't it be better to have the controller inform the view to update itself as soon as the model is changed? Doing it every second seems overkill. – Fildor Mar 22 '17 at 14:30
-
Yes, to have one of the collumns be a timer "Time left before Event" – Zellarius Mar 22 '17 at 14:31
-
2Use `Timer.Tick` event for updating displayed time in the grid – Fabio Mar 22 '17 at 14:32
-
Fildor, the updates happens from other forms so the only way (i know ) to make sure is to update every second – Zellarius Mar 22 '17 at 14:32
-
Fabio, as i said, i already have a Timer function to update something. What i dont know is how to create a custom collumn and fill it with "Event_Time - Current_Time" – Zellarius Mar 22 '17 at 14:36
-
[Trying to apply a “digital clock” to each row in a “Timer” column using Winforms](http://stackoverflow.com/questions/39518627/trying-to-apply-a-digital-clock-to-each-row-in-a-timer-column-using-winforms) – 001 Mar 22 '17 at 14:47
-
Show how you create other columns for datagridview. If datagridview bounded to the datasource, then add extra column to the datasource – Fabio Mar 22 '17 at 16:32