Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
146
Highlighting cells
posted

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);

 

 

 

if (m1.Success)

 

 

 

 

 

 

 

 

 

{

 

   row.Cells[

 

"key1"].Style = Resources["HighlightCell"] as Style;

 }

 

 

 

 

 

 

 

 

 

}

 

<Style x:Key="HighlightCell" TargetType="ig:CellControl">

<Setter Property="Background" Value="LightGray"/></Style>

 

 

 

foreach

Parents
No Data
Reply Children
No Data