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
210
I can't user int64 fields with Xamnumeric editor
posted

I have been using Xamnumeric editor with my Int32 fields without issue

I had to increase the size of some fields as I needed more than the max field size of an Int32, but now the editor does not bind to the field - it isn't calling the Set method of the property.

The code below works.  If I change the property to be Int64 and change ValueType="{x:Type clr:Int64}", it doesn;t work. 

Any ideas ?

<Style x:Key="Product_Eutariffcode_style" TargetType="{x:Type symphonyControls:FieldControl}">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Focusable" Value="False"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type symphonyControls:FieldControl}">
<igWPF:XamNumericEditor
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Name="ctlProduct_Eutariffcode"
Value="{Binding Path=Eutariffcode
, Converter={StaticResource nullConverter}
,UpdateSourceTrigger=Default
,ValidatesOnDataErrors=True}"
ValueType="{x:Type clr:Int32}"
Mask="{}{char:10:0-9-}"
Validation.ErrorTemplate="{StaticResource validationTemplate}"
IsEnabled="{Binding Path=EutariffcodeIsEnabled}"
IsReadOnly="{Binding Path=EutariffcodeIsReadOnly}"
Width="120"
ToolTip="{Binding RelativeSource={RelativeSource Self},Path=(Validation.Errors), Converter={StaticResource errorConveter}}">
<i:Interaction.Behaviors>
<uiControls:SelectAllNumericEditorBehavior></uiControls:SelectAllNumericEditorBehavior>
</i:Interaction.Behaviors>
</igWPF:XamNumericEditor>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

Parents
No Data
Reply
  • 2680
    Offline posted
    Hello Gordon,

     

    Thank you for posting to Infragistics community.

     

    I have been looking into your question and created a small sample with a XamDataGrid containing a field of type Int64. This field has the XamNumericEditor as its editor by default and on my side I am unable to reproduce the issue your are facing. The editor is correctly bound to the field and the Int64.MaxValue, for instance, is also correctly displayed.

     

    Additionally, the editor could be explicitly set by specifying the EditorStyle property on the FieldSettings object. Using this approach, I am also able to bind the Int64 field correctly.

     

    You can find the test sample attached below. As I am not able to reuse the exact code snippet you included, since some unspecified namespaces are mentioned there, please test the sample on your side and let me know how it behaves and if this is an accurate demonstration of what you are trying to achieve. If not, please feel free to modify it and send it back to me along with steps to reproduce.

     

    Thank you for your cooperation. 

     

    Looking forward to hearing from you.

     

    Sincerely,
    Bozhidara Pachilova
    Associate Software Developer
Children
No Data