Ticket T580621
Visible to All Users

Use an input mask for numeric input on Bootstrap Text box

created 7 years ago

I'm looking to assign the value of a Bootstrap text box on page load & while I do this, it doesn't format the number nicely. When I'm displaying double values in a column I use

ASPx
<PropertiesTextEdit DisplayFormatString="# ###,##0.00"> </PropertiesTextEdit>

to format the number as a currency value. Now I'd like to do something similar with an input. I've tried using the following in the textbox markup on the aspx page:

ASPx
<dx:BootstrapTextBox ID="txt_Amount" runat="server"> <MaskSettings Mask="# ###,###.00" IncludeLiterals="None" ErrorText="Please input missing digits" /> <ValidationSettings CausesValidation="True" ValidationGroup="ValPaymentDetails"> <RequiredField ErrorText="A payment value is required" IsRequired="True" /> </ValidationSettings> </dx:BootstrapTextBox>

What this does is turn a value of "238579.4" to "2 835 794.__" is there a better way to do this? I need a currency format "# ###,###.##"

Thanks in advance

Answers approved by DevExpress Support

created 7 years ago

Hi Daniel,

Mask has a different behavior and should be implemented in a different way - see Mask for details. You need to use the BootstrapTextBox.DisplayFormatString property for this task.

Let me know if this helps.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.