Florian @ SharePoint UserGroup



Print Button für Listeneinträge 

Tags:

Uns hat gerade eine Anfrage aus Deutschland bzgl. Ausdrucken eines Listeneintrages ereilt. Nachdem ich schon sehr lange nichts mehr gebloggt habe und gerade im Auto Richtung Salzburg sitze (keine Sorge – als Beifahrer ;-))-> dachte ich so bei mir, das ist die ideale Gelegenheit ein Comeback zu feiern :-D.
Bingen brachte im ersten Schritt keine wirklich brauchbare Lösung. Es gibt zwar eine SharePoint Designer Lösung - http://xblogs.kompas-xnet.si/post/SharePoint-Print-List-Item.aspx - das müsste man aber mühsam für jede Liste einrichten und einige kommerzielle Lösung, aber wer will schon für so eine Lösung (die eigentlich im Standard enthalten sein sollte) Geld ausgeben.
Somit Visual Studio starten und eine Sandbox Solution entwickeln. Leeres Element hinzufügen:

In das neu erstellte Elements.xml folgendes Einfügen:

<?xml version="1.0" encoding="utf-8"?>

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

<CustomAction Id="PrintRibbon" Location="CommandUI.Ribbon" Sequence="20">

<CommandUIExtension>

<CommandUIDefinitions>

<CommandUIDefinition Location="Ribbon.ListForm.Display.Actions.Controls._children">

<Button Id="PrintRibbonButton" Command="Print"

Sequence="20" Image32by32="/_layouts/images/centraladmin_security_informationpolicy_32x32.png"

Description="Prints the actual form" LabelText="Print Form"

TemplateAlias="o1" />

</CommandUIDefinition>

</CommandUIDefinitions>

<CommandUIHandlers>

<CommandUIHandler Command="Print"

CommandAction="javascript:window.print(SP.UI.Dialog.html);" />

</CommandUIHandlers>

</CommandUIExtension>

</CustomAction>

</Elements>

deployen und Voila

Ein paar Links und Tipps, die zum Entwickeln eines eigenen Menü-Eintrags sehr nützlich sind:

Und für alle Entwickler – schaut euch den SP.UI Namespace an, die in diesem Fall verwendete SP.UI.Dialog Klasse ist ziemlich genial -> http://msdn.microsoft.com/en-us/library/ee552096.aspx

Wer die Sandbox wsp haben will -> kann sich gerne bei uns melden...

 
Posted by f.grasel on 12-Nov-11
1 Comments  |  Trackback Url  |  Link to this post | Bookmark this post with:        
 

Comments


wedding dress multitudinous commented on Monday, 5-Dec-2011
cocktail dresses deals Many as well as dimension mom for the bride wedding celebration outfits are produced in gentle fabrics which consist of chiffon and silk. If these fabrics are not your style, search for just about any attire in fabrics you would really feel additional cozy wearing. Buy wedding dress wedding dress designer wedding gowns at discount prices ,You also do not need to place on matronly types or customized evening place on to look elegant.
If you in no way place on suits white prom dresses 2010 , you will most almost certainly really feel additional cozy within of a attire than a dinner suit. ball gown wedding dresses ball gown wedding dresses , royal blue bridesmaid dress vintage prom dress If your daughter is acquiring married within your backyard in August cocktail prom dresses cocktail prom dresses, a knee-length attire can be additional best suited collectively with an exceptional offer cooler than a full-length, additional formal evening dress .
The color the bride can be wearing. The bride may nicely be placing on a pastel instead of whitened if that is her 2nd marriage.The all round color plan for the wedding. A-line Wedding Dress blue sweetheart prom dress tea length prom dresses ,The goal can be to possess a harmonious look in any celebration photography used for the whole wedding celebration party.Any color preference the bride may nicely have using the mom for the bride and mom for the groom dresses dresses . You should choose a design and material that reflects your exclusive design as well as the formality for the different event dresses . wedding dresses online wedding dresses online ,A lengthy attire with lengthy sleeves is best suited for just about any formal wedding. Short-sleeved and knee-length outfits are much less formal.especially for just about any formal evening wedding, brown cocktail dresses brown cocktail dresses however it is generally used owning a multi-colored accent color.
http://www.mylove-dress.com/

Name

Url

Email

Comments

CAPTCHA Image Validation