Hello,
I have a requirement to change the row and font colors based on the values of a cell in my grid. One of the necessary colors is white font a dark green background. I have the following code in my view -
<Controls:XamDataGrid.Resources> <Style x:Key="style" TargetType="{x:Type igDP:DataRecordCellArea}" > <Setter Property="Background" Value="{Binding Record.DataItem.ColorIndex, RelativeSource={RelativeSource Self}, Converter={StaticResource IntegerToRowColorConverter}}" /> <Setter Property="Foreground" Value="{Binding Record.DataItem.ColorIndex, RelativeSource={RelativeSource Self}, Converter={StaticResource IntegerToFontColorConverter}}" /> </Style> </Controls:XamDataGrid.Resources>
.
<igDP:FieldLayout> <igDP:FieldLayout.Settings > <igDP:FieldLayoutSettings DataRecordCellAreaStyle="{StaticResource style}" /> </igDP:FieldLayout.Settings> <igDP:UnboundField Name="colorindex" BindingPath="ColorIndex" Label="colorindex" >
This is working fine when my view launches - everything is formatted as it should be.
However, I am running into issues when I click on a cell in the grid. When clicked, the font is turning back to black. When I then click on another cell, the black font stays and doesn't not turn back to white.
Is there something that is firing on the XamDataGrid that might be causing this? Does anyone see any issues with the code I am currently using?
Thanks for any thoughts.
Hello Carl,
Thank you for your post. I have been researching your issue and have created a small sample for you. Please find the attached sample and do not hesitate to contact us if you have any further questions.
I am just checking your progress on the issue. If you require any further assistance please do not hesitate to ask.