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
30
XamNumericEditor - Hide the dot when in editmode
posted

Hi,

I have a strange issue where in XamNumericEditor is being used inside XamDataGrid as Field Editor Style. When the cell is in edit mode there is a "." dot present there. I am aware that its because of the mask. However, I would like to get rid of the dot as its causing confusion to users.

<igEditors:XamNumericEditor x:Name="testEditor" VerticalAlignment="Top"

Width="100" PromptChar="" Mask="nnnnnnnnnnnnn.nnnnnnnnnn" Format="#,0.##########" TrimFractionalZeros="True">

</igEditors:XamNumericEditor>

This field accepts both integers and decimals for values. The ask is that unless the "dot" is typed explicitly from the keyboard it should not be present.

Another issue is that when the cell is clicked in the right-most corner to kick off the editing - the cursor is focused on the right of the decimal point, because of which the user inadvertently captures a fractional value when he meant it to be a whole number.

I have looked in to XamMaskedEditor with RegEx - but IMHO that's ugly hack and I lose other goodness of Numeric Editor.

<igEditors:XamMaskedEditor Width="200"

PromptChar=""

ValueType="system:Decimal"

Mask="{}{char:24:.0-9}"

HorizontalContentAlignment="Right"

VerticalAlignment="Center" EditModeValidationError="ValueEditor_OnEditModeValidationError" >

<igEditors:XamMaskedEditor.ValueConstraint>

<igEditors:ValueConstraint ValidateAsType="Decimal"

RegexPattern="\d{1,13}(\.\d{1,10})?" />

</igEditors:XamMaskedEditor.ValueConstraint>

</igEditors:XamMaskedEditor>

Is there any way this can be solved in XamNumericEditor?

PS: I am using version 14.1.2108