Have been up all night trying to figure this one out. I am using an Infragistics.Win.UltraWinGrid.UltraGrid. The DataSource for the grid is a BindingSource that uses a custom data structure. Binding and property updates are working fine. Grid is readonly.I want to change the color (toggle) of a row if the underlying value changes. Here is a very simplified snippet of my original code using the recommended InitializeRow event (note, for simplification I am just coloring the whole row for the example, whereas actually I am coloring a cell in my application):private void ugWatchlist_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e){ if (!e.ReInitialize) return; Infragistics.Win.Appearance app1 = new Infragistics.Win.Appearance(); app1.BackColor = Color.Green; Infragistics.Win.Appearance app2 = new Infragistics.Win.Appearance(); app2.BackColor = Color.Red; if (e.Row.Appearance.BackColor.Name != Color.Green.Name) e.Row.Appearance = app1; else e.Row.Appearance = app2;}However, the color change works only once (and rows turn red on the firs t update and stay that way). According to the code, the color should toggle on each update. I can confirm in the debugger that the BackColor property is indeed changed but not reflected by the UltraGrid.Am I missing something here? I have gone through all the samples and examples and couldn't find a solution to this problem. Please help.
ok..i'm resurrecting another old post. sorry. not finding much on this topic. this post is the closest i found and was verified. (aside from Matts post which didn't quite meet my requirements. a timer may work though).
i basically have a databound grid which receives new rows/updates in realtime (works great btw). but when a row is added/updated i want the row to flash an existing appearance object for like 2 seconds. but i don't want to lock up the gui if there are alot of updates. this may get into thread syncronization issues and i don't want to go that deep.
any help or tips would be apprecaited.
Al
Thanks for the response. I resolved the issue by keeping track of changes in the underlying data structure.
podrazer said:Any suggestions how to get the "previous" value in a cell just before initializeRow is fired?
The grid doesn't store the old value. You would have to store it yourself somewhere. Perhaps you could use a hidden, unbound column in the grid to keep the old value.
Thanks for all the suggestions. I figured out the problem some days back and just posting the update here. I fixed the issue by firing a timer on each update and resetting the value when the timer gets triggered.
However, now I have to "flash" the cell based on "how" the value changed, i.e. if the value is numeric and it decreased I have to flash it with red, otherwise green. Any suggestions how to get the "previous" value in a cell just before initializeRow is fired?
Hi,
I suggest you try with a different version of NetAdvantage and see if the error is still happening. If the issue is not resolved then submit a case to developer support.
Magued