Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have created custom action to view on webpart page but i can not see it.

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction Id="MyRibbonCustomization" Location="CommandUi.Ribbion">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.WebPartPage.Groups._children">
          <Group Id="Ribbon.WebPartPage.MyRibbonWebPart"
                 Sequence="20"
                 Description="Custom ribbion"
                 Title="ribbion Addition"
                 Template="Ribbon.Templates.Flexible2">
            <Controls Id="Ribbon.WebPartPage.MyRibbonWebPart.Controls">
              <Button Id="Ribbon.WebPartPage.MyRibbonWebPart.DemoButton"
                      Command="demoAction"
                      Description="A DemoAction"
                      LabelText="Demo Action"
                      TemplateAlias="02"
                      Sequence="10"/>
            </Controls>
          </Group>
        </CommandUIDefinition>
      </CommandUIDefinitions> // I had to ..
      <CommandUIHandlers>
        <CommandUIHandler Command="demoAction" CommandAction="javascript:alert('hello');" />
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
</Elements>
share|improve this question
    
@Raja,Thanks... –  Harsh Bhavsar Apr 30 '13 at 8:17
    
So you followed all of steps in this post or are you doing something else, msdn.microsoft.com/en-us/… –  Muhammad Raja Apr 30 '13 at 8:21
    
Yes..I had followed it. Also refer this link(howtosharepoint.blogspot.in/2010/06/ribbon-basics.html) –  Harsh Bhavsar Apr 30 '13 at 8:47
    
Make sure your location attribute is correct: CommandUI.Ribbon as I notice your example has CommandUi.Ribbon (lowercase i on the end) –  spevilgenius Apr 30 '13 at 10:44
    
Done but again same Result.. –  Harsh Bhavsar Apr 30 '13 at 12:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.