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
Hello EASii IC,
Thank you for the feedback. Please do not hesitate to let me know if you have any further questions.
I have been looking into your latest post.
Would you please modify the sample application I have provided with the functionality you are using, so it reproduces the issue. This way I would be able to further investigate this issue for you.
Thank you for the cooperation. Looking forward to hearing from you.
I give you the sample with the binding error.
The problem is on the button
Thank you for the provided sample application. I was able to reproduce the issue. What I can suggest is to create an additional style for the UnboundColumns. In this style you can set the binding to the DataContext.RowData. UniqueID.
I have modified the sample application for you. Please find it attached and feel free to let me know if you have any further questions on this matter.
When i use your sample i have some error in output :
System.Windows.Data Error: 40 : BindingExpression path error: 'RowData' property not found on 'object' ''Worker' (HashCode=46243781)'. BindingExpression:Path=DataContext.RowData.UniqueID; DataItem='CellControl' (Name=''); target element is 'CellControl' (Name=''); target property is 'NoTarget' (type 'Object')