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
950
Color a cell of a Datapresenter with condition
posted

The Goal is to color the cell CDvi_CodDvi : red if CDvi_CodCli = 0 and blue if not .

The following Xaml dot work ( i work with thee sample of infragistic )

The converter : passingToColorConverter is good.

Where is the error  

thank you Caiseodev

<igDP:XamDataPresenter Name="XDPDevis" SelectedItemsChanged="XDPDevis_SelectedItemsChanged" RecordActivated="XDPDevis_RecordActivated">


<igDP:XamDataPresenter.FieldSettings>

 

<igDP:FieldSettings AllowEdit="False" />


</igDP:XamDataPresenter.FieldSettings>

 

<igDP:XamDataPresenter.FieldLayoutSettings>

<igDP:FieldLayoutSettings AutoGenerateFields="False"/>

</igDP:XamDataPresenter.FieldLayoutSettings>

<igDP:XamDataPresenter.FieldLayouts >

<igDP:FieldLayout >

<igDP:FieldLayout.Fields>

<igDP:Field Name="CDvi_CodDvi" Label="Code" Width="70" >

<igDP:Field.Settings>

<igDP:FieldSettings CellWidth="70" LabelWidth="70">

<igDP:FieldSettings.CellValuePresenterStyle>

<Style TargetType="{x:Type igDP:CellValuePresenter}">

<Setter Property="Background"

Value="{Binding Path=Cells[CDvi_CodCli].Value, Converter={StaticResource passingToColorConverter}}">

</Setter>

</Style>

</igDP:FieldSettings.CellValuePresenterStyle>

</igDP:FieldSettings>

</igDP:Field.Settings>

</igDP:Field>

<igDP:Field Name="CDvi_CodCli" Label=" Client" Width="30"></igDP:Field>

<igDP:Field Name="NomCli" Label=" Client" Width="120"></igDP:Field>

<igDP:Field Name="CDvi_DatDvi" Label="Date" Width="70"></igDP:Field>

<igDP:Field Name="CDvi_DesDvi" Label="Designation" Width="150"></igDP:Field>

</igDP:FieldLayout.Fields>

</igDP:FieldLayout>

</igDP:XamDataPresenter.FieldLayouts>

</igDP:XamDataPresenter>

  

Parents Reply Children
No Data