Note that there are some explanatory texts on larger screens.

plurals
  1. POWPF Converter Issues
    primarykey
    data
    text
    <p>I have 2 issues with converters in WPF</p> <p>First, Instead of adding the converter to my unboundfield I'd like to add the converter to the setter value property as follows</p> <pre><code>&lt;Setter Property="Value" Value="{Binding FirstTransactionAllocationAmount, converter={StaticResource myconverter}" /&gt; </code></pre> <p>But It does not work.</p> <p>Here's my code sample</p> <pre><code>&lt;igDP:XamDataGrid Name="gdWorksheetLine" Grid.Row="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" AutoFit="True" BindToSampleData="False" BorderThickness="2" DataSource="{Binding Path=PaymentAdjustmentAllocation, Mode=TwoWay}"&gt; &lt;igDP:XamDataGrid.FieldLayouts &gt; &lt;igDP:FieldLayout IsDefault="True" Key="ClaimWorksheet"&gt; &lt;igDP:FieldLayout.Fields&gt; &lt;igDP:UnboundField Name="FirstTransactionAllocationAmount" Label="AmountKey" BindingPath="FirstTransactionAllocationAmount" Converter="{StaticResource NegativeToPositiveValueConverter}" &gt; &lt;igDP:Field.Settings&gt; &lt;igDP:FieldSettings EditorType="{x:Type igEditors:XamCurrencyEditor}" LabelWidth="100" CellWidth="100" InvalidValueBehavior="RetainValue"&gt; &lt;igDP:FieldSettings.EditorStyle&gt; &lt;Style TargetType="{x:Type igEditors:XamCurrencyEditor}"&gt; &lt;Setter Property="Mask" Value="$nn,nnn,nnn,nnn.nn" /&gt; &lt;Setter Property="PromptChar" Value="" /&gt; &lt;Setter Property="FlowDirection" Value="LeftToRight"/&gt; &lt;Setter Property="Value" Value="FirstTransactionAllocationAmount" /&gt; &lt;/Style&gt; &lt;/igDP:FieldSettings.EditorStyle&gt; &lt;/igDP:FieldSettings&gt; &lt;/igDP:Field.Settings&gt; &lt;/igDP:UnboundField&gt; &lt;/igDP:FieldLayout&gt; &lt;/igDP:XamDataGrid.FieldLayouts&gt; &lt;/igDP:XamDataGrid&gt; </code></pre> <p>Secondly, I would like to create a converter that uses another datagrid field cell value as a parameter, any ideas??</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload