Hi,
I begin with XamDataGrid, and i do some fonctionnality easy.
But now i would like one think, i think easy but no.
i would like to change the border coler of cell when the Tag of cell content "comment".
i write this:
<Style TargetType="{x:Type igDP:CellValuePresenter}" x:Key="BorderComment">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Cell.Tag.ToString()}" Value="comment">
<Setter Property="BorderBrush" Value="Red"/>
<Setter Property="BorderThickness" Value="1,1,1,1"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
but it don't work.
i need some help,
thank for all
Nathalie
Your trigger's binding is off. The DataContext of a CellValuePresenter is the associated DataRecord, and you can't call ToString() in a binding expression. Here's the right way to do it...
<Style TargetType="{x:Type igDP:CellValuePresenter}"> <Style.Triggers> <DataTrigger Binding="{Binding Path=Cells[SomeFieldName].Tag}" Value="comment"> <Setter Property="BorderBrush" Value="Red"/> <Setter Property="BorderThickness" Value="1" /> </DataTrigger> </Style.Triggers></Style>
Josh
thanks josh.
but i have another question :)
your code it's ok for one Cell but now how do i for 24 Cells ?
thanks, for all