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
235
XamNumericEditor to show negative sign sign always
posted

Hi,

I have a column in Xamdatagrid which needs to be always negative. I used this mask to allow only negative values.

<Setter Property="Mask" Value="{}{double:-14.2:c}" />

<Setter Property="ValueConstraint">
                                                <Setter.Value>
                                                    <igEditors:ValueConstraint MaxInclusive="0"/>
                                                </Setter.Value>
                                            </Setter>

The issue with this it allow me to enter 2 decimal place numbers. The user has to always explicity add a -ve sign to continue entering the value.

Can the XamnumericEditor itself show the negative '-' sign for that column when start editing

 

Thanks

  • 138253
    Offline posted

    Hello gneeraj,

    Thank you for your post. I have been looking through it and it seems like there isn’t any built-in functionality. Although I can suggest you use the ValueChanged event of the XamNumericEditor and check if the value is positive and if so, multiply it by -1, to make it negative. Please note, we are making efforts to ensure all posts are addressed by an Infragistics expert. We believe that the other community members could benefit from this thread as well.

    Feel free to write me if you need further assistance.