[CLOSED] Adding/removing (hide/show) tools in panel server side

  1. #1

    [CLOSED] Adding/removing (hide/show) tools in panel server side

    How can I add / remove (or show / hide) tools buttons in C # - in DirectEvent / DirectMethod?

    I have tool definition:

    <Tools>
    <ext:Tool CustomType="my-tool" Hidden="true"  />
    </Tools>
    I try in DirectMethod show/hide tool - according ClientName value:

    //test
    var t = PanelOperator.Tools.Where(x => x.CustomType == "my-tool").FirstOrDefault();
                
     if (client.ClientName.Contains("IsInvalid") )
    {
        t.Hidden = false;
    }
    
     if (client.ClientName.Contains("IsValid") )
    {
        t.Hidden = true;
    }
    but visibility doesn't change (Ext.NET 1.2)....

    Pawel
    Last edited by Daniil; Apr 23, 2013 at 3:50 AM. Reason: [CLOSED]
  2. #2
    Hi @Pawel,

    Yes, a Tool is not a real component in Ext.NET v1. So, it cannot be managed that way.

    It is possible to show/hide via JavaScript. So, you can implement a JavaScript function and call it from server.

    Here is an example of accessing tools client side via JavaScript. It should help you to implement a function to hide/show tools.
    http://forums.ext.net/showthread.php?14108#post59188

Similar Threads

  1. [CLOSED] TabPanel - show/hide tabs from server code
    By jwf in forum 2.x Legacy Premium Help
    Replies: 10
    Last Post: Nov 12, 2012, 3:32 PM
  2. Replies: 1
    Last Post: Dec 01, 2010, 5:14 PM
  3. Replies: 0
    Last Post: Nov 17, 2010, 9:32 PM
  4. Replies: 2
    Last Post: May 02, 2010, 4:33 PM
  5. [CLOSED] Show-Hide BorderLayoutRegion server side
    By methode in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 21, 2009, 9:42 AM

Posting Permissions