Enable disable application menu items

8 posts, 0 answers
  1. Abhilash
    Abhilash avatar
    9 posts
    Member since:
    Dec 2012

    Posted 16 Jan 2013 Link to this post

    Hello ,

    I want to enable/disable rad ribbon applicationmenu items. I tried .Enabled property.but not working.
    Please provide me a solution.

    Thanks
    Abhi
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 16 Jan 2013 Link to this post

    Hi,

    Try the following code snippet to achieve your scenario.

    JS:
    <script type="text/javascript">
     function OnClientClick() {
            var menu = $find('<%= RadRibbonBar1.ClientID %>')._applicationMenuDropDown;
            var item1 = menu.get_items().getItem(0);
            //get the first item from the application menu
            //disables the first item from the application menu
            item1.set_enabled(false);
        }
    </script>

    Please take a look into this documentation for more information.

    Hope this helps.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Abhilash
    Abhilash avatar
    12 posts
    Member since:
    Jul 2012

    Posted 25 Jan 2013 Link to this post

    Thank you Princy,

    It worked fine. Now the disabled menu's image is 'X' mark. Can I retain its original image when it is in disabled mode.

    Thank you
    Abhilash
  5. Abhilash
    Abhilash avatar
    12 posts
    Member since:
    Jul 2012

    Posted 03 Feb 2013 Link to this post

    Hello,

    Any hope?
  6. Abhilash
    Abhilash avatar
    12 posts
    Member since:
    Jul 2012

    Posted 04 Feb 2013 Link to this post

    Hi
    I want to disable chkFbar .
      <telerik:RibbonBarGroup Text="Show/Hide" EnableLauncher="false">
                                    <Items>
                                        <telerik:RibbonBarControlGroup Orientation="Vertical">
                                            <telerik:RibbonBarTemplateItem>                                  
                                                <telerik:RadButton ID="chkFbar" ToggleType="CheckBox" ButtonType="ToggleButton"
                                                    runat="server" Text="Formula" Value="FBAR">
                                                </telerik:RadButton>
                                            </telerik:RibbonBarTemplateItem>
                                        </telerik:RibbonBarControlGroup>
                                    </Items>
                                </telerik:RibbonBarGroup>

    I tried  Chk = $find("<%= chkFbar.ClientID %>");
              Chk.disable();
    But not working.Plz help me.

    Thank you
  7. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 04 Feb 2013 Link to this post

    Hi,

    Try the following javascript.
    JS:
    var Chk = $find("<%= chkFbar.ClientID %>");
    Chk.set_enabled(false);

    Thanks,
    Princy
  8. Abhilash
    Abhilash avatar
    12 posts
    Member since:
    Jul 2012

    Posted 22 Feb 2013 Link to this post

    Hello Princy,

    Thank you for your reply. I am using Q3. Can I achieve the menu enable/disable functionality using .Enabled property.

    Thank you
    Abhilash
  9. Abhilash
    Abhilash avatar
    9 posts
    Member since:
    Dec 2012

    Posted 05 Oct 2013 Link to this post

    Hello Princy,

    I want to access rad ribbonbar items in client side and set/get its values. Please help me to achieve this.
    I want to do the following things.
    1.Get and Set values to ddlText
    2.Get and Set values to cbSize

    My rad ribbonbar looks like follows.

     <telerik:RibbonBarGroup Text="Font" EnableLauncher="false" Value="Font">
                            <Items>
                                <telerik:RibbonBarControlGroup Orientation="Vertical">
                                    <telerik:RibbonBarControlGroup Orientation="Horizontal" >
                                        <telerik:RibbonBarDropDown ID="ddlText"   Width="97" >
                                            <Items>
                                                <telerik:RibbonBarListItem Text="Arial" />
                                                <telerik:RibbonBarListItem Text="Calibri (body)"  Selected="true" />
                                                <telerik:RibbonBarListItem Text="Comic Sans" />
                                                <telerik:RibbonBarListItem Text="Tahoma" />
                                                <telerik:RibbonBarListItem Text="Verdana" />
                                            </Items>
                                        </telerik:RibbonBarDropDown>
                                        <telerik:RibbonBarComboBox ID="cbSize"  Width="40" >
                                            <Items>
                                                <telerik:RibbonBarListItem Text="8"  />
                                                <telerik:RibbonBarListItem Text="9" />
                                                <telerik:RibbonBarListItem Text="10" Selected="true" />
                                                <telerik:RibbonBarListItem Text="11" />
                                                <telerik:RibbonBarListItem Text="12" />
                                                <telerik:RibbonBarListItem Text="14" />
                                                <telerik:RibbonBarListItem Text="16" />
                                                <telerik:RibbonBarListItem Text="18" />
                                                <telerik:RibbonBarListItem Text="20" />
                                                <telerik:RibbonBarListItem Text="22" />
                                                <telerik:RibbonBarListItem Text="24" />
                                                <telerik:RibbonBarListItem Text="26" />
                                                <telerik:RibbonBarListItem Text="28" />
                                            </Items>
                                        </telerik:RibbonBarComboBox>
                                    </telerik:RibbonBarControlGroup>
                                    <telerik:RibbonBarControlGroup Orientation="Horizontal">
                                        <telerik:RibbonBarToggleButton  ID="tgleBold" Size="Small" Text="Bold" ImageUrl="images/icons/formD-Small-Icon-Bold.png"
                                            DisabledImageUrl="images/icons/formD-Small-Icon-Bold.png" Value="BOLD" />
                                        <telerik:RibbonBarToggleButton Size="Small" Text="Italic" ImageUrl="images/icons/formD-Small-Icon-Italic.png"
                                            DisabledImageUrl="images/icons/formD-Small-Icon-Italic.png" Value="ITALIC" />
                                        <telerik:RibbonBarToggleButton Size="Small" Text="Underline" ImageUrl="images/icons/formD-Small-Icon-Underline.png"
                                            DisabledImageUrl="images/icons/formD-Small-Icon-Underline.png" Value="UNDERLINE" />
                                        <telerik:RibbonBarToggleButton Size="Small" Text="Strikethrough" ImageUrl="images/icons/formD-Small-Icon-Strike.png"
                                            DisabledImageUrl="images/icons/formD-Small-Icon-Strike.png" Value="STRIKE" />
                                        <telerik:RibbonBarToggleList>
                                            <ToggleButtons>
                                                <telerik:RibbonBarToggleButton Size="Small" Text="Superscript" ImageUrl="images/icons/Superscript.png">
                                                </telerik:RibbonBarToggleButton>
                                                <telerik:RibbonBarToggleButton Size="Small" Text="Subscript" ImageUrl="images/icons/Subscript.png">
                                                </telerik:RibbonBarToggleButton>
                                            </ToggleButtons>
                                        </telerik:RibbonBarToggleList>
                                    </telerik:RibbonBarControlGroup>
                                </telerik:RibbonBarControlGroup>
                            </Items>
                        </telerik:RibbonBarGroup>

    Expecting your fast response.
    Thank you
    Abhi
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017