[CLOSED] Formpanel read-only

Hybrid View

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

    [CLOSED] Formpanel read-only

    you can disable all controls of a formpanel?
    Or should I turn them off one at a time?
    Last edited by Daniil; Oct 08, 2010 at 3:49 PM. Reason: [CLOSED]
  2. #2
    Hi,

    There is no such method in the FormPanel.

    I would suggest you to use cascade method.

    For example, a code disabling all TextFields within a FromPanel can look something like this:

    var myFunction = function() {
        if (this.getXType() == 'textfield') {
            this.setDisabled(true);
        }
    }
    
    FormPanel1.cascade(myFunction);
  3. #3
    only works if the javascript function is declared in the page.
    but if I declare an external file

    <!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>GridPanel with Form Details - Ext.NET Examples</title>
     
    
    <script type="text/javascript" src="Js/JScript.js"></script>
    
    </head>
    <body>
    <form id="Form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    getXType() is undefined....


    how can I use ExtJS functions in a js file outside?
  4. #4
    Please try the following thing.

    Example
    <ext:ResourcePlaceHolder runat="server" />
    <script type="text/javascript" src="Js/JScript.js"></script>
  5. #5
    unfortunately still does not work.

     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    
    <!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>GridPanel with Form Details - Ext.NET Examples</title>
    <link href="../../../../resources/css/examples.css" rel="stylesheet" type="text/css" />
    <ext:ResourcePlaceHolder ID="ResourcePlaceHolder1" runat="server" Mode="Script" /> 
    <script type="text/javascript" src="Js/JScript.js"></script>
    </head>
  6. #6
    Can I look at the code that causes js error?

    Posting .aspx page reproducing the issue would be the best.

Similar Threads

  1. Replies: 0
    Last Post: Nov 17, 2011, 10:53 AM
  2. [CLOSED] Read Only NumberField
    By iansriley in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Nov 04, 2010, 6:25 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