tags:

views:

34

answers:

0

I followed this link to create custom ribbon tab/group/controls in a custom web part.

The custom ribbon tab/group/control renders when web part is displayed on the page, however, all the buttons are disabled.

What I did:

  1. During OnLoad event, initialized List of IRibbonCommand with all my button command id; initialized page component and registered with SPRibbonScriptManager; registered ribbon scripts for getglobalCommands, commandEnabled, and handleCommand.
  2. During OnPreRender event, use SPRibbon to load XML and RegisterDataExtension for the whole structures; use SPRibbon to MakeTabAvailable and set InitialTabId.

PageComponent script has been registered and initialized properly. Tab/Group/Control are displayed but buttons are disabled and the info indicates 'the control is currently disabled'. I am the site administrator and have full permission so security is not a problem.

Any idea?