This is a migrated thread and some comments may be shown as answers.

Rad ribbonbar menu-Hacking is possible or not

3 Answers 38 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Abhilash
Top achievements
Rank 1
Abhilash asked on 12 Mar 2013, 06:47 AM
Hello All,
I have a rad ribbon bar having Application menu. Some of the menu items are disabled on page load(in client side). We can change the disabled menu to an enabled one in client side using fire bugger (remove rmDisabled from class="rmLink rmDisabled rmDisabled").My question is - Is there any possible way to enable a menu item which is actually in disabled mode and perform its server action.

Thank you
Abhilash

3 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 12 Mar 2013, 01:13 PM
Hello,

You have full access to the ApplicationMenus client object, which allows you to enable or disable every item. Here's some sample code showing how you can do this:
function pageLoad() {
    var ribbonbar = $find("RadRibbonBar1"),
        applicationMenu = ribbonbar.get_applicationMenuDropDown(),
        item = applicationMenu.get_items().getItem(0);
             
    item.set_enabled(false);
}

 

Greetings,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Abhilash
Top achievements
Rank 1
answered on 13 Mar 2013, 05:20 AM
Thank you Bozhidar ,
You have miss understood me.Actually I have not asked how to enable or disable a menu item. My question is- I have a menu item "Save". That is in disabled state.After rendering in browser, we can edit its css and make it enabled. So once it enabled, can I perform Save functionality.

Thank you
Abhilash
0
Bozhidar
Telerik team
answered on 13 Mar 2013, 06:43 AM
Hello Abhilash,

Changing the css alone would not re-enable the item. You have to call the set_enabled(true) method of its client object, as I demonstrated in my previous reply.
 

Kind regards,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Menu
Asked by
Abhilash
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Abhilash
Top achievements
Rank 1
Share this question
or