Use a single event receiver for document library and a list


event receiver for two or more list type (e.g document library, custom list, links, announcment )

Goal:
I want a event receiver to be triggered when a item is added to all the list type in a site , whether is document library, custom list, links , announcement or what ever

Mm... How i can use a single event receiver for multiple list types

Here you go,

Create a Event receiver, & Navigate to the Elements.xml file,

You'll find similar to something below


  
    
      EventReceiver1ItemAdded
      ItemAdded
      $SharePoint.Project.AssemblyFullName$
      EventReceiverName.EventReceiver1.EventReceiver1
      10000
    
  



Here ListTemplateId="101" denotes the Document Library.

Well do you wanna find the list template id's of Custom List, Picture Library etc.?

Just go to the SPListTemplateType msdn site.

Alright, Back to goal,

Just duplicate the tag for each and every list templates

I want the same event receiver to be triggered for announcement

Then my elements.xml will look like below



  
    
      EventReceiver1ItemAdded
      ItemAdded
      $SharePoint.Project.AssemblyFullName$
      MarketInfoUniqueItemPermission.EventReceiver1.EventReceiver1
      10000
    
  
  
    
      EventReceiver1ItemAdded
      ItemAdded
      $SharePoint.Project.AssemblyFullName$
      MarketInfoUniqueItemPermission.EventReceiver1.EventReceiver1
      10000
    
  



Where ListTemplateId="103" stands for Announcement.

Job done..


 



Open with explorer - Documet Library - Move files - Custome code - Javascript - sharepoint


Open with explorer - Documet Library - Move files - Custome code - Javascript - sharepoint



Open
[use content editor webpart for the above code]

How to download all list templates in .stp (at once / or at single click) ? Sharepoint 2010

How to download all list templates in .stp (at once / or at single click) ?

In your site collection,

1. Goto 'Site actions' and click 'Site settings'

2. Under Galleries section, you can find 'List templates' , click it.

3. In the ribbon, click the Library tab and click the 'open with explorer' icon







4. then the file explorer window will be open with all the list templates in .stp format

5. Select All ->  Copy -> Paste it in your dest. folder

Tats it

Happy Coding !!!!

to change the width of sharepoint list column 2010

To change the width of sharepoint list column










keywords: change list column width sharepoint 2010, column width sharepoint 2010

Keep ur coding aside.. Relax for some time..