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
350
XamGrid Row background color
posted

Hello,

I'm tryng to set background color of row on my Xamgrid.

I make something like this : 

<UserControl.Resources>
<Style TargetType="{x:Type ig:CellControl}">
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Cell.Row.CommandeFournisseur.Numero}" Value="IC/140029">
<Setter Property="Background" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</UserControl.Resources>

But when the value is IC/140029 nothing append...

My xamgrid is like this :

<ig:XamGrid x:Name="dataGrid"
AutoGenerateColumns="False"
ColumnWidth="auto"
FontSize="10"
FontFamily="Calibri"
Foreground="Black"
Grid.Column="0"
Grid.Row="1"
Grid.ColumnSpan="2"
RowHover="Row"
RowHeight="20"
Margin="5"
ItemsSource="{Binding ListeAfterFiltre}">

ListeAfterFiltre is type of ObservableCollection<CommandeFournisseur>


thanks