[CLOSED] Disable plugin on client side

  1. #1

    [CLOSED] Disable plugin on client side

    Hi All,

    Can I disable a plugin on event?

    For example:
    <ext:Checkbox runat="server">
    <Listeners>
      <Change Handler="function(item,newItem,oldItem){
              if(newItem==true){
                       #{control2}.plugins=undefined; //???
         }
      }"></Change>
    </Listeners>
    </ext:Checkbox>
                                    
    
    <ext:TextField runat="server" ID="control2" >
    <Plugins>
       <ext:InputMask runat="server" Mask="(99) 9999 9999" />
    </Plugins>
    </ext:TextField>
    Thank you.
    Last edited by Daniil; Jul 21, 2014 at 8:00 AM. Reason: [CLOSED]
  2. #2
    Hi @rbtceo,

    Please use this to disable:
    App.control2.inputMask.disable();
    and this to enable
    App.control2.inputMask.enable();
    As a side note, you don't need a function wrapper if you use handler.
    <Change Handler="if (newValue) { App.control2.inputMask.disable(); }" />
  3. #3
    Hi Daniil,

    Thank you for your answer.

    this is a page:
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="input_mask.WebForm1" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
            <div>
            <ext:Checkbox runat="server">
                <Listeners>
                  <Change Handler="function(item,newItem,oldItem){
                     if(newItem==true){
                            #{control2}.inputMask.disable();
                        }
                        else{
                            #{control2}.inputMask.enable();
                        }
                  }"></Change>
                </Listeners>
            </ext:Checkbox>
                                     
     
            <ext:TextField runat="server" ID="control2" >
            <Plugins>
               <ext:InputMask runat="server" Mask="(99) 9999 9999" />
            </Plugins>
            </ext:TextField>
        </div>
        </form>
    </body>
    </html>
    it works fine ones, then exceptions follow. Try it.
  4. #4
    I cannot reproduce.

    As far as I can remember it has been already fixed in SVN. Please update.
  5. #5
    Daniil,

    Thank you.
    I took the latest version from NuGet.

    Could you specify your version build number?
  6. #6
    I think NuGet doesn't contain that fix. It has been fixed after v2.5.2 release. You should get Ext.NET from SVN.

    Could you specify your version build number?
    A build number depends on the time of actual building. So, it is not quite useful information in this case.
  7. #7
    Thank you.

Similar Threads

  1. Replies: 3
    Last Post: Feb 17, 2014, 11:29 AM
  2. Replies: 4
    Last Post: Feb 03, 2014, 6:40 PM
  3. How to disable a plugin server side
    By bit9bug in forum 1.x Help
    Replies: 1
    Last Post: Apr 01, 2013, 12:31 PM
  4. [CLOSED] Gridpanel disable column sorting (client side)
    By tanky65 in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 25, 2012, 3:39 PM
  5. [CLOSED] Disable/Hide row in PropertyGrid on client side
    By bakardi in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Jun 09, 2011, 5:14 PM

Tags for this Thread

Posting Permissions