Hi,
I'm looking for recommendations / documentation on how to use the grid to display dynamically changing data? For example, I have a requirement to show a grid of 100+ rows and ~10 columns where the value in each cell can change potentially change many times per second. However, from a user perspective it will be acceptable to update the visible cells once per second (if the data has changed). I'd also like to provide a visual indication for the cells that have changed values in the latest update (for example, by changing the background color of the cell for half a second).
(The grid actually needs to display ticking market data for all the equity stocks within a particular index (S&P, FTSE, etc.))
Cheers,
Dave.
how do you using the source data. If you will use a DataTable as DataSource and make changes to the DataTable the grid will be showing the changes automatically. It also will work if you will use a List<T> or a BindingList<T> and each object in the list is implementing the INotifyPropertyChanged interface.
For the second requiremend I have no solution or tip for you I am sorry.
I am also looking to do this. I have created a DrawFilter to set the background colour. However coparing the cell current value and original value does not behave as I expected.
OriginalValue is never updated from when it was first set.
1) Grid is read only
2) DataSource is a DataSet
3) DataSource is only updated through code
protected virtual void SetCellBackColour(UltraGridCell aCell, ref UIElementDrawParams drawParams) { double newValue = (double)aCell.Value; double origValue = (double)aCell.OriginalValue; if (newValue > origValue) { drawParams.AppearanceData.BackColor = Color.LightGreen; } else if (newValue < origValue) { drawParams.AppearanceData.BackColor = Color.Pink; }
Thanks in advance.