Hi,
I want to background one column's cells according to the value in another cell.
I have created a style which works great:
<
Style x:Key="vlBackgroundStyle" TargetType="{x:Type igDP:CellValuePresenter}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Cells[6].Value}" Value="True">
<Setter Property="Background" Value="Green" />
</DataTrigger>
</Style.Triggers>
</Style>
the only problem is that it applies to all cells. i want the style to apply only to one cell.
how do I accmplish that?
I figured I need to do simething like
<igDP:Field Name="Value" Label="Value">
<igDP:Field.Settings>
<igDP:FieldSettings CellValuePresenter="{StaticResource vlBackgroundStyle}"/>
</igDP:Field.Settings>
</igDP:Field>
but that's not the correct syntax... Thank You
forget it, I succeeded. Tank you very much!!
What's wrong in that Style syntax?
<Style x:Key="vlBackgroundStyle" TargetType="{x:Type igDP:CellValuePresenterStyle}">
the compiler tells me :
Error 1 The type reference cannot find a public type named 'CellValuePresenterStyle'. Line 48 Position 93. D:\NewBakarTrade\NewBakarTrade\Window8.xaml 48 93 ParamMisgarot
what's the correct way to do that?
Yes
Can I accomplish my goal with CellValuePresenterStyle?
(Coloring background of a cell according to the value in another cell in the same record)
Actually, looking at it again you are trying to set the CellValuePresenter property of the FieldSettings object, which does not exist. Perhaps you want the CellValuePresenterStyle?