I have a style in my xaml which changes the background color of the cell. The code below changes the background of each cell depends on whether the search text is found or not.
But only some cell of that column's background are changed and not all. What is the solution for this.
(Row row in xamGridPlan.Rows)
string text = row.Cells["key1"].Value.ToString();
Match m1 = Regex.Match(text, findText, regexOptions);
{
row.Cells[
"key1"].Style = Resources["HighlightCell"] as Style;
}
<Style x:Key="HighlightCell" TargetType="ig:CellControl">
<Setter Property="Background" Value="LightGray"/></Style>
foreach
Without seeing the issue I would guess that the rows that are styled with the AlternateRow colors are the ones that aren't styling for you.
If this is the case you could turn off the AlternateRow coloration. This can be done by setting the grid.IsAlternateRowEnabled to false;
This thread would explain what needs to be done if you want the Alternate rows to recolor
http://forums.infragistics.com/forums/p/30703/169472.aspx#169472
Or you could use our Conditional Formatting feature
http://help.infragistics.com/NetAdvantage/Silverlight/2010.3/CLR4.0/?page=xamGrid_Conditional_Formatting.html