Tuesday, March 6, 2012

Part 1: Hello Custom Ribbon For Task List

Step 1: Create  new list TotalLeaveFormOfEmployee type Task List  include Fields:
Employee: Lookup
Employee:ID: Lookup (Employee:ID is created below)
EmployeeLogin: Person or Group
LeavedDays: Number
RemainingLeavingDays: Calculated (=TotalDaysCanBeLeave-LeavedDays)
Step 2: Add New Data
Step 3: Open visual Studio 2010 | Create new Empty Sharepoint Project name is CustomRibbon
Step 4: Add new Item | choose Empty Element name is EmptyElement1
Step 5: Copy Folder Images to your Project download file in lessonhttp://www.mediafire.com/file/qxi48rm8p8vw3vr/Custom%20Ribbon%20Display%20Detail%20Of%20Item.rar
Step 6: Open File Elements.xml and copy code in tag
code here

<?xml version="1.0" encoding="utf-8"?>
 <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction Id="Ribbon.HelloWorld"
                Title="Hello Word">
        <CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
          <Button Id="Ribbon.HelloWorld.Button"
                  LabelText="View Detail"
                  Command="HelloWorld" />
        <CommandUIHandler Command="HelloWorld"
                          CommandAction="javascript:alert('Hello word');"/>

Step 7: Open List and choose item
Step 9: Click Icon Ribbon Hello Word, you will see
Step 10: Finish


Post a Comment