[CLOSED] Number Field

  1. #1

    [CLOSED] Number Field

    hi,
    i got the coolite error, after Copy and paste some text value in NumberField, then i click the submit button.. i have set the CausesValidation="false" for that button even i got coolite error... how to fix this issue...



     
    <%@ Page  Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server"> 
       
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }
        protected void climbcancelTran_Click(object sender, DirectEventArgs e)
        {
            X.Msg.Alert("Test", "climbcancelTran").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>Ext.Net Example</title>
        
        
    </head>
    <body>
        <form id="Form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
     <ext:NumberField ID="cltfRate" runat="server" AllowBlank="false" EnableKeyEvents="true"
                                                AllowDecimals="true" DecimalSeparator="." MaxLength="8" InvalidText="Invalid data."
                                                DecimalPrecision="5" MinValue="0.000001" BlankText="Rate is required">                                           
    </ext:NumberField>
                                            
    <ext:Button ID="climbcancelTran" Icon="Cancel"
    AlternateText="Cancel" CausesValidation="false" runat="server">
    <DirectEvents>
    <Click OnEvent="climbcancelTran_Click" />
    </DirectEvents>
    </ext:Button>  
        </form>
    </body>
    </html>
    Last edited by Daniil; Jan 09, 2011 at 12:10 PM. Reason: [CLOSED]
  2. #2
    Hi,

    To avoid this error I would suggest you to set SubmitValue to "False" for NumberField.

    Example
    <ext:NumberField ... SubmitValue="true">
    Pay attention that in that case you have to manually send NumderField's value if you need this on server side.
  3. #3
    Hi,

    Try to clear raw value in the Invalid event handler instead submitting prevent
    <Invalid Handler="this.setRawValue('');" />
  4. #4
    Could you clarify also why do you use CausesValidation property?

    Please note that this property deals with server side validation.
    http://msdn.microsoft.com/en-us/libr...alidation.aspx

Similar Threads

  1. [CLOSED] Number Field
    By Vasudhaika in forum 1.x Legacy Premium Help
    Replies: 19
    Last Post: Jul 19, 2011, 8:59 AM
  2. [CLOSED] Number field Error
    By pil0t in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 22, 2010, 5:42 AM
  3. [CLOSED] Nullable number field
    By Stefanaccio in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 02, 2010, 5:06 PM
  4. [CLOSED] [1.0] Number field as grid editor
    By Timur.Akhmerov in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: May 04, 2010, 3:58 AM
  5. Number Field
    By fabiomarcos in forum 1.x Help
    Replies: 2
    Last Post: Jan 20, 2009, 11:29 AM

Posting Permissions