[CLOSED] NumberField zero empty text and value

  1. #1

    [CLOSED] NumberField zero empty text and value

    Hi,

    below example if i type "0" to a number field, in direct event i get an empty value and text.
    But if i type any number i can get the result.

    This caused after upgrading from 1.0 to 1.2 .

    Thanks.

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ExtNETTest.WebForm1" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Button_Click(object sender, DirectEventArgs e)
        {
            X.Msg.Alert("DirectEvent", string.Format("NumberField1 Text : {0}<br/>NumberField1 Value : {0}", NumberField1.Text, NumberField1.Value)).Show();
        }
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title></title>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" RegisterAllResources="true" />
        <form id="form1" runat="server">
        <ext:Panel runat="server" ID="pnlCont" Width="200">
            <Content>
                <ext:Button ID="Button1" runat="server" Text="Click Me">
                    <DirectEvents>
                        <Click OnEvent="Button_Click">
                            <EventMask ShowMask="true" />
                        </Click>
                    </DirectEvents>
                </ext:Button>
                <ext:NumberField ID="NumberField1" Width="40" runat="server" AllowDecimals="false"/>
            </Content>
        </ext:Panel>
        </form>
    </body>
    </html>
    Last edited by Daniil; Jan 25, 2012 at 7:34 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Quote Originally Posted by kemalyigit View Post
    This caused after upgrading from 1.0 to 1.2 .
    I guess you've updated from SVN, because I was unable to reproduce the problem with the official v1.2 release.

    Could you confirm?
  3. #3
    o yes rev. nr. is 3795.
    i always get the trunk, for 1.2 i should follow below link, right ?

    http://svn.ext.net/premium/tags/1.2.0

    Thanks, sorry for that.
  4. #4
    Yes, that should be a correct link to get v1.2.

    Anyways, I would consider it a bug and thanks for the report.

    Another bug with postbacks has been fixed, but it broke this aspect. We will investigate.
  5. #5
    The thread is related to:
    http://forums.ext.net/showthread.php?16469

    The fix has been corrected, revision #3817.

    Also, there are two important changes which might be breaking.

    1. Now a NumberField with zero on client is not considered IsEmpty on server, i.e. IsEmpty property returns false instead of true.

    2. The NumberField's Number property returns double.MinValue for en empty NumberField instead of zero. You might need to analyze the IsEmpty property.


    The fix will be also available with the upcoming v1.3 release.

    Thanks again for the report.
    Last edited by Daniil; Jan 23, 2012 at 11:33 AM.

Similar Threads

  1. Replies: 2
    Last Post: Jul 11, 2012, 5:18 PM
  2. [CLOSED] NumberField empty value (-1.7976931348623157e+308)
    By caha76 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 25, 2011, 9:55 PM
  3. Replies: 6
    Last Post: Dec 03, 2010, 5:42 PM
  4. Empty NumberField
    By yyyhxm1 in forum 1.x Help
    Replies: 3
    Last Post: Aug 23, 2010, 2:50 AM
  5. [CLOSED] Empty NumberField
    By armadalabs in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 20, 2010, 8:42 AM

Posting Permissions