[CLOSED] How to disable whole CycleButton with menu by javascript?

  1. #1

    [CLOSED] How to disable whole CycleButton with menu by javascript?

    Hello:

    I created a CycleButton with some menu items. How can I disable the whole CycleButton? I want to use disable() in client side, but I cannot use ID to find the control. The code is create in c# code
                var buttonKeyInput = new CycleButton
                                         {
                                             ID = "CycleInputButton",
                                             ClientIDMode = ClientIDMode.Static,
                                             ShowText = true,
                                             ArrowAlign = ArrowAlign.Right,
                                             ForceIcon = "tool-key-workin-16",
                                             PrependText = Strings.PlanToolbar_BuildDataGroup_Input_Mode,
                                             OverflowText = Strings.PlanToolbar_BuildDataGroup_Input,
                                         };
    
                var menuKeyInput = new Menu();
                menuKeyInput.Items.AddRange(new[]
                                                {
                                                     new CheckMenuItem{
                                                        ID ="CheckMenuDirect",
                                                        Text="Direct",
                                                        Group ="GroupInputType",
                                                        Checked =true},
                                                     new CheckMenuItem{
                                                        ID ="CheckMenuPercent",
                                                        Text="Percent",
                                                        Group ="GroupInputType",
                                                        Checked =false},
                                                });
                buttonKeyInput.Menu.AddRange(new MenuBase[] { menuKeyInput });
    Last edited by Daniil; May 17, 2012 at 12:29 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Quote Originally Posted by leon_tang View Post
    I cannot use ID to find the control.
    Please clarify why?
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,



    Please clarify why?
    Aha, I found the issue. Please I used the wrong ID. Could you please close this thread because the problem solved now?

    Thank you
  4. #4
    Sure, I will close.

    Thanks for the update.

Similar Threads

  1. [CLOSED] Disable Treegrid column menu
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 27, 2012, 7:31 PM
  2. Replies: 2
    Last Post: Feb 22, 2012, 4:16 PM
  3. [CLOSED] CycleButton with menu only
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 22, 2011, 3:54 PM
  4. Set disable menu commands
    By DGil in forum 1.x Help
    Replies: 2
    Last Post: Jun 19, 2009, 8:13 AM
  5. [CLOSED] CycleButton - adding menu items in code behind
    By Justin_Wignall in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 17, 2009, 1:25 PM

Posting Permissions