I'm testing DevX GridControl (version 20.1). I need to bind the background colour of each row to a field in my model. I'v tried various ways, but all end with changing the background of all the rows of the grid using the background associated with the selected row. With an old version, i was able to manage that with:
<dxg:TableView AllowResizing="True" AutoWidth="True" ShowTotalSummary="True" >
<dxg:TableView.RowStyle>
<Style TargetType="{x:Type dxg:GridRowContent}">
<Setter Property="Background" Value="{Binding DataContext.DataModel.ColoreSfondo, ElementName=CDList}" />
</Style>
</dxg:TableView.RowStyle>
</dxg:TableView>
I also tried conditional formatting, but I cannot figure out how to bind the background to my model.
Problem solved!
Just replace the Setter line with this one: