Hello,
I have following problem with XamGrid:I want to use conditional formatting of cells with StyleScope="Row", according to a value of a cell in XamGrid should be changed the foreground colour (red) of the whole row. I set the "conditional" column to values in order to set foreground colour in whole XamGrid to red. Everything was OK, until conditional formatting changed the style of visible rows. When I scrolled to see other rows, I was surprised, because some of them were red, some of them were not. When I scrolled to the beginning to see the first rows, theyhad the same problem! Other thing is, that it behaved indeterminately - for example I had 5 visible rows in XamGrid, but I had 7 rows in the whole grid. So I had to scroll to seethe 6. and 7. row, but sometimes the 6. row had the style not set, sometimes the 7. has the same problem, but the 6. was set.
After these troubles I tried to set foreground colour "directly" in code in this way:
Brush BlackForegroundBrush = new SolidColorBrush(Color.FromArgb(0xFF, 0, 0, 0));Brush RedForegroundBrush = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0, 0));Brush brush;
foreach (Row row in grid.Rows){ VxSJEmisia emisia = row.Data as VxSJEmisia; if (emisia != null) { if (emisia.Valid) { brush = BlackForegroundBrush; } else { brush = RedForegroundBrush; }
foreach (Cell cell in row.Cells) { if (cell != null && cell.Control != null) { cell.Control.Foreground = brush; } } }}
But the XamGrid had the same behavior.Surprisingly in some cases the cell.Control has null value in existing XamGrid !
Please, could somebody help me with this? Thanks a lot.
I have downloaded the last Service Release, which I have found on www.infragistics.com (version: 20103.2117 released on 18-Feb-2011), but it seems, this bug was not fixed - the behavior of XamGrid is the same.
There have been multiple Service Releases since the release of 10.3, (we aim for about 1 per month) so it might be something that has been resolved already.
You should check you https://ko.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads for the latest SR.
Hello,I have added into your project some code to show how it works. Function Button_Click changes IDMod4 of a Person from 3 to 2 in order to change the style of rows.If you click the button "Change IDMod4", rows with ID 7,11,19,23, and so on... should be changed, but nothing happens unless you scroll down and back. I have tried to use StyleScope="Cell", the behavior is the same.I suppose, there is a refresh problem, do I have to use some refreshing functionality of XamGrid?
I am using dlls from .NET Advantage 2010.3, the exact version of InfragisticsSL4.Controls.Grids.XamGrid.v10.3.dll is: 10.3.20103.1006 .
Thanks.