I'm mocking up a display that shows "orders" as they are sent into a central booking page. I'm thinking that it would be very nice to have the rows that have changed show up with some colored highlighting for a short time. I have a field that contains the modifiedAt timestamp, so I'm thinking perhaps it would start out bright yellow and then fade out over 30 seconds or so.
I'm new to Windows Forms and .net in general. Can someone give me pointers on how to do this? Nothing specific, just a broad outline?
Maury
Maury Markowitz said:Sure, but from a performance aspect, is it wise to loop over a grid of several thousand rows and examine/change each one? Is there some other way to do this?
There are a number of ways you could do this without looping through all of the rows in the grid.
You could loop through the grid.ActiveRowScrollRegion.VisibleRows, for example.
Of.. you could keep a List<UltraGridCell> of cells that need to be updated and remove those cells from the list once the color has completely faded out.
It really depends on where your updates are coming from (the data source, the grid, or the code) and how you want to handle keeping track of which one need to be highlighted.
Sure, but from a performance aspect, is it wise to loop over a grid of several thousand rows and examine/change each one? Is there some other way to do this?
You could use the System.Windows.Forms.Timer component for this; set its Interval, handle the Tick event, and change the UltraGridRow.Appearance.BackColor with each firing of the Tick event.