-->

15/10/2012

Webparts in Sharepoint 2010

In this post we will see a few commonly used webaprts in Sahrepoint 2010.

1. Content Editor Webpart: This webpart will be used for authoring rich content.This will be available in Media and Content section.

Here is an example, i have added a content editor webpart, and added some text, images, Links, Files to it, you can see the options available on the top. For example if you want to create a simple html menu on the page, use it.
 You can even edit the content in a html editor using the "Format Text" ribbon options.

2. Media Webpart : This webpart is a best pick to host media elemnts like video or Images.
Once you add Media webpart to page and enter edit mode of webpart, you can see options to add a video or images.
Once you did it, here is the result . . .

3. Page Viewer Webpart: If you have a webpage wither internal/external as a part of the web part page, Page Viewer webpart is a best pick for it. An example is shown below.

 4. Silverlight Webpart:  Silverlight means rich and powerful applications. Now you can intigrate it at a webpart level using Silverlight webpart. Once you deployed the silverlight application (.xap) to site, just add this webpart to page and specify the silverlight application url in the dialog.

 5. Business Data Webparts : I have a external content type and there are few actions defined on it using which i can read, write data on to external system. For example i have created a BSC Entity with details and 2 actions defined on it. Now, we will see a few Business Data web parts and how the dispaly gona vary. You will have the flexibility to modify the display using XSLT as well.

Business Data List:
 Business Data Item:
 Business Data Actions:
 6. Chart Webpart: Even though its part of Business Data webparts, it has wide range of functionality, so it worth to preset as a seperate webpart.
As the name depicts, this webpart is used to display the data in a graphical represntation. Once the web part is selected on to webpart page, you will be presented with options to select the data source.

 Step 1: Add web part.
 
Step 2: Select the data source.
 Step 3: Choose the axis elements from data feilds.
Step 4: Modify the other display elemnts and the final disply of  LandCost chart webpart is here.
 7. Infopath Form Webpart: This is a brand new webpart in SP2010. This is a best pick if you want to display Infopath enabled / editable Lists or libraries. You can create all three kinds of infopath documents and can display all "Create", "Edit" and "Display List" forms. What to be displayed, that you have to select from Edit Webpart windows as shown below.
I have a infopath editform enabled for list named "Land Cost". For which we created a Infopath form webpart.
 Web part displaying Edit - Infopath form for Land Cost list:


8. Content Query Webpart : The Content Query Web Part is available for pages on sites in which the publishing infrastructure feature has been activated. Probably the most common use of the Web Part is to roll up information from multiple lists into a single view. You can apply filters and styles to make the content look the way you want. Imagine you have a publishing page that displays a certain article and you want to display a list of related stories next to it on the page. Using the Content Query Web Part, you can search all the lists on the site that use the same keywords as the keywords for the featured article, and display them in a list.
For exmaple i created a simple list content type called consumer and a list created based on that content type.

Now go to Webpart page and add a web part and select "Content Query" webpart from content rollup section.

 Now, click on Open the tool pane link and configure the list on which the webpart should operate.

Once you click ok, you will see the webpart getting populated with the first column of the list, which may not be the desired result everytime. So, go to Presentation part of content query properties window, and change the "Fields to Display" part of configuration.

There are other parts of the configuration, where you can control the query which can control the results fetched under Filters section and the way to display can be controled using Grouping and Sortin section.
 Finally the results will be displayed on the Content Query webpart.

These are the few commonly used out-of-box webparts. We will see search webparts in a seperate post.
Kindly let me know if you want anything other webparts which you have used that need to be listed in this post. Thanks.

Is it helpful for you? Kindly let me know your comments / Questions.

No comments:

Post a Comment