NumberField or SpinnerField with value same as MinValue returns NULL and empty text

  1. #1

    NumberField or SpinnerField with value same as MinValue returns NULL and empty text

    ExtNet 1.6 from website
    .NET 4
    VS2012
    IE8, IE10

    NumberField and SpinnerField with value same as MinValue returns NULL and empty text on DirectEvent.

    According to ExtJs MinValue is the minimum allowed value:
    The minimum allowed value (defaults to Number.NEGATIVE_INFINITY)

    <%@ Page Language="C#" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (ExtNet.IsAjaxRequest || IsPostBack) return;
        }
    
        protected void SubmitForm(object sender, DirectEventArgs e)
        {
            ExtNet.Msg.Show(new MessageBoxConfig { Message = string.Format("Value = {0}, Text = {1}", nfBlaBla.Value, nfBlaBla.Text) });
        }
    </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 runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager runat="server" />
        <ext:Viewport runat="server" Layout="FitLayout">
            <Items>
                <ext:Panel runat="server" Layout="FormLayout">
                    <Items>
                        <ext:SpinnerField runat="server" ID="nfBlaBla" FieldLabel="Value" MinValue="1" MaxValue="9" />
                    </Items>
                    <Buttons>
                        <ext:Button runat="server" ID="Submit" Text="Submit">
                            <DirectEvents>
                                <Click OnEvent="SubmitForm" />
                            </DirectEvents>
                        </ext:Button>
                    </Buttons>
                </ext:Panel>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>
    Last edited by mturnhout; Mar 14, 2013 at 3:52 PM. Reason: With example

Similar Threads

  1. Replies: 2
    Last Post: Feb 07, 2013, 11:40 AM
  2. Replies: 1
    Last Post: Jul 26, 2012, 1:18 PM
  3. [CLOSED] NumberField MinValue return null value
    By Aurelio in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 22, 2012, 1:10 PM
  4. [CLOSED] NumberField zero empty text and value
    By kemalyigit in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 23, 2012, 11:30 AM
  5. Replies: 0
    Last Post: Dec 02, 2011, 12:23 AM

Tags for this Thread

Posting Permissions