[CLOSED] Numberfield with separator returns min value when number with separator added

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Numberfield with separator returns min value when number with separator added

    Hi

    I have some troubles figuring this one out. I am sure it is just a little error in the config but I can't figure it out on my own. In the following example please insert once a number without a separator (returns the number) and once a number with the separator "." (returns min value) and click on the button.

    Thank you.

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
    
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                NumberField nfield = new NumberField
                {
                    ID = "nfDouble",
                    FieldLabel = "enter double",
                    AllowDecimals = true,
                    DecimalSeparator = ".",
                    AllowBlank = false,
                    EmptyText = "needed",
                    HideTrigger = true
                };
    
                this.Form.Controls.Add(nfield);
            }
        }
    
        [DirectMethod]
        public void showNumber()
        {
    
            X.Msg.Alert("double", X.GetCmp<NumberField>("nfDouble", new NumberField.Config() { AllowDecimals = true, DecimalSeparator = "." }).Number.ToString()).Show();
        }
    
    </script>
    
    <!DOCTYPE html>
    
    <html>
    <head id="Head1" runat="server">
        <title></title>
    
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" Locale="de-CH" />
            
            <ext:Button runat="server" Text="show number" Handler="App.direct.showNumber();"></ext:Button>
    
        </form>
    </body>
    </html>
    Last edited by Daniil; Jan 17, 2014 at 3:50 PM. Reason: [CLOSED]

Similar Threads

  1. numberfield control and decimal separator
    By cperriot in forum 1.x Help
    Replies: 0
    Last Post: Jul 17, 2012, 2:36 PM
  2. [CLOSED] Group separator property for number field
    By Daly_AF in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 11, 2012, 4:26 PM
  3. [CLOSED] How to allow thousand separator in ext:NumberField?
    By sailendra in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: May 07, 2012, 10:35 AM
  4. [CLOSED] Thousand separator in number Field
    By FpNetWorth in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 28, 2010, 1:01 PM
  5. [CLOSED] Thousands separator in numberfield
    By 78fede78 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 08, 2010, 12:50 PM

Posting Permissions