[CLOSED] Read Only NumberField

Threaded View

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

    [CLOSED] Read Only NumberField

    I'm having trouble reading the current value of a NumberField set to readonly=true. I'm updating the number in the field with a button and direct event and then showing the results in an alert. When I click the Show button, I get the default value and not the value in the field. If the NumberField is set to readonly=false, it works fine. Please let me know if I'm missing something...code sample follows.

    Thank you.

     
    <head runat="server">
        <title></title>
        <script runat="server" >
            Protected Sub Button1_Click(ByVal sender As Object, ByVal e As AjaxEventArgs)
                ScriptManager1.AddScript("Ext.Msg.alert('Alert', '" & numNet.Number & "');")
            End Sub
            Protected Sub Button2_Click(ByVal sender As Object, ByVal e As AjaxEventArgs)
                numNet.Number = 5.12
            End Sub
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
             <ext:ScriptManager ID="ScriptManager1" runat="server" />                         
             <ext:NumberField ID="numNet" runat="server" FieldLabel="Net" Width="100" AllowDecimals="true" TrimTrailedZeros="False" ReadOnly="True" />
            <ext:Button ID="Button1" runat="server" Text="Show">
                <AjaxEvents>
                    <Click OnEvent="Button1_Click" />
                </AjaxEvents>
            </ext:Button>
       
            <ext:Button ID="Button2" runat="server" Text="Set Number">
                <AjaxEvents>
                    <Click OnEvent="Button2_Click" />
                </AjaxEvents>
            </ext:Button>
        </div>
        </form>
    </body>
    Last edited by Daniil; Nov 04, 2010 at 8:51 PM. Reason: [CLOSED]

Similar Threads

  1. Replies: 2
    Last Post: Jul 11, 2012, 5:18 PM
  2. [CLOSED] Formpanel read-only
    By 78fede78 in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Oct 08, 2010, 3:40 PM
  3. [CLOSED] [1.0] TriggerField read-only
    By danielg in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 04, 2009, 10:15 AM
  4. [CLOSED] Read GridPanelRows
    By GmServizi in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 03, 2009, 12:40 PM

Posting Permissions