Skip to main content
Tweeted twitter.com/StackSharePoint/status/763412132021035008
edited title
Link
Nderon Hyseni
  • 1.8k
  • 6
  • 35
  • 65

How to display list columns in Tab viewsin the Ribbon? SharePoint 2013?

Source Link
Nderon Hyseni
  • 1.8k
  • 6
  • 35
  • 65

How to display list columns in Tab views? SharePoint 2013?

I have a list called empribbon and I have created a custom ribbon Tab or Group and I have named it General Info as shown in the image:

My default view for Edit tab

In my custom tab I have also created a button; as shown in the following image

My default view for General info tab

Now what I want is: In the EDIT tab only the field Title must be shown there just like I did it in my photo

How I want EDIT tab to be

and in the General Info tab only those fields Name Age Adress and Phone No must be shown there just like I did it in my photo

How I want General Info tab to be

My code I used to create my General Info tab:

 <?xml version="1.0" encoding="utf-8"?>
 <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   <CustomAction
     Id="CustomRibbonTab"
     Location="CommandUI.Ribbon"
     RegistrationId="0x0100FF9897B958E2C74FB67BEFF08AFA1786"
     RegistrationType="ContentType">
     <CommandUIExtension>
       <CommandUIDefinitions>
         <CommandUIDefinition
           Location="Ribbon.Tabs._children">
           <Tab
             Id="Ribbon.CustomTab"
             Title="General Info"
             Description="general info"
             Sequence="501">
             <Scaling
               Id="Ribbon.CustomTab.Scaling">
               <MaxSize
                 Id="Ribbon.CustomTab.MaxSize"
                 GroupId="Ribbon.CustomTab.CustomGroup"
                 Size="OneLargeTwoMedium"/>
               <Scale
                 Id="Ribbon.CustomTab.Scaling.CustomTabScaling"
                 GroupId="Ribbon.CustomTab.CustomGroup"
                 Size="OneLargeTwoMedium" />
             </Scaling>
             <Groups Id="Ribbon.CustomTab.Groups">
               <Group
                 Id="Ribbon.CustomTab.CustomGroup"
                 Description="Custom Group!"
                 Title="Custom Group"
                 Sequence="52"
                 Template="Ribbon.Templates.CustomTemplate">
                 <Controls Id="Ribbon.CustomTab.CustomGroup.Controls">
                   <Button
                     Id="Ribbon.CustomTab.CustomGroup.CustomButton"
                     Command="CustomTab.CustomButtonCommand"
                     Sequence="15"
                     Description=""
                     LabelText="Custom Button"
                     Image32by32="/_layouts/images/PPEOPLE.GIF"
                     TemplateAlias="cust1"/>
 
                 </Controls>
               </Group>
             </Groups>
           </Tab>          
         </CommandUIDefinition>
         <CommandUIDefinition Location="Ribbon.Templates._children">
           <GroupTemplate Id="Ribbon.Templates.CustomTemplate">
             <Layout
               Title="OneLargeTwoMedium"
               LayoutTitle="OneLargeTwoMedium">
               <Section Alignment="Top" Type="OneRow">
                 <Row>
                   <ControlRef DisplayMode="Large" TemplateAlias="cust1" />
                 </Row>
               </Section>
             </Layout>
           </GroupTemplate>
         </CommandUIDefinition>
       </CommandUIDefinitions>
       <CommandUIHandlers>
         <CommandUIHandler
           Command="CustomTab.CustomButtonCommand"
            CommandAction="javascript:alert('Hello, world!');" />
       </CommandUIHandlers>
     </CommandUIExtension>
   </CustomAction>
 </Elements>

How Can I do this?

Please Help me!