Showing posts from January, 2012

How to Insert a Web Part in the NewForm, EditForm and DisplayForm.aspx in a list without using SharePoint Designer

In this article, we are going to know very useful and tricky tip in SharePoint.
We have options for inserting the web parts in the home page or any libraries in the SharePoint using Site Settings -> Edit Page -> Insert Web Part

What will you do for inserting a web part in the New/Edit/Display forms in the list?
So, we will go to SharePoint designer and edit the list page and insert the web part. This is the usual way.

Suppose that, I want to insert webpart without using the SharePoint designer. Is it possible? Yes.
Here is the trick!
Steps: Go to the list page -> Click New for adding the item as shown below

This is the URL, we will get we click New Item in the List.
Here, we use TOOLPANEVIEW concept in the SharePoint to implement the same.
After the “NewForm.aspx” part of the URL, erase…

Lookup columns in SharePoint 2010

In the previous article, we have learned about basics of lookup columns and the disadvantages in lower versions of SharePoint.
In this article, we will discuss the capabilities of lookup columns in SP 2010.
There are two types of lookup columns:
1. Lookup columns with an enforced relation
2. Lookup columns with an unenforced relation

Lookup columns with an enforced relation
In a lookup column with an enforced relationship (also called referential integrity), you can lookup single values and maintain the integrity of your data in the target list in one of two ways: Cascade Delete When an item in the target list is deleted; the related item or items in the source list are also deleted. In this case, you want to make sure that all related items are deleted as part of one database transaction.
Restrict Delete When you try to delete an item in the target list, and it has one or more related items in the source list, you are prevented from deleting the item in the target list. In this case,…

Lookup columns in SharePoint

In this article, we are going to discuss a simple and useful feature of SharePoint which is called lookup columns.

What are Lookup columns in SharePoint?
ØIn simple words, it is a referential integrity between the lists in SharePoint (It is something like relating the two columns in a table in the database using queries).
ØWe will create lookup columns, when we need to create relationship between two lists.
ØTo create a relationship between two lists, in the source list, you create a lookup column that retrieves one or more values from a target list if those values match the value in the lookup column in the source list.

Advantages of Lookup columns
ØEasily create relationships between the lists without using calculated fields ØCreates multiple relations between the lists

Lookup columns in WSS 3.0 and MOSS 2007
We have two custom lists created named Asset Details and Operating Systems
In Operating Systems list I have the following columns
ID - Default column
Title- Single Line of Text
Release Vers…

Reading the Custom Properties of MS Office Word 2007 & 2010 documents

Earlier, we have discussed about reading the Summary and Custom Properties of Word 2003 using DSO DLL.
Here are the articles references Basics of DSO DLL Reading Summary Properties of Word 2003 Reading Custom Properties of Word 2003
As already mentioned in the above articles, DSO dll is a 32 bit and also it has OLE property reader class, which can read only the office 2003 documents. The same DSO file cannot be used for reading the properties of 2007 & 2010. This is because, word 2003 stores the properties in OLE type and hence DSO has capabilities to read the properties. But word 2007 and 2010 stores in XML formats.
Want to know how the office 2007 & 2010 stores the properties in XML formats? Change the extension of word 2007 or 2010 documents from .docx to .zip. Now extract the contents. You will see many xml files inside that folder. Now open the folder -> docProps folder -> 3 files will be there                     
1.  App.xml – it stores the document’s summary properties  …

Creating and Deploying a Visual Web Part using Microsoft Visual Studio 2010

To know about the Basics of Visual web part, read this article before knowing how to create and deploy the visual web part using visual studio 2010.
We will create a Visual web part for uploading the document to the SharePoint document library. At the end of this article, we will learn      1.How to create and deploy a Visual Web part      2.How to programmatically upload a document to the SharePoint Document library
Open the Visual Studio and create a Visual Web Part project as shown below
When you click OK, you will see a pop-up window which will ask for the SharePoint site where the web part is going to be deployed as shown below. Hence give the proper URL of the SharePoint site. Also select the option Deploy as a farm solution because, visual web part is not a sandboxed solution
Once clicked Finish, you will see the project created with all the necessary files (assembly, .ascx files, feature to be deployed, .web part file) for a web part in the solution explorer as shown below
Click on th…

Basics of Visual WebPart in Microsoft Visual Studio 2010

In this article, we are going to discuss about an interesting feature of Microsoft which is called Visual Webpart.
Web parts play an important role in the SharePoint design and development. In the lower versions of SharePoint, we have to write the code for designing the webpart and then the custom code for its function. But with the introduction of Visual Studio 2010 and SharePoint 2010 improved the way of creating and deploying the web parts in SharePoint (which is drag & drop the controls and design easily). What is Visual Webpart? In simple words, visual webpart is the wrapping the web user control (.ascx page) within a web part.  Hence, the Web Part class will load a User Control in the Web Parts CreateChildControls() method and this user control is what you can drag and drop your controls to design the webpart. The Visual Studio interface nicely makes these operations seamless and takes care of all the wiring for deployment. I will diagrammatically represent the visual web part


Implementing Federated Search Result (Twitter) in SharePoint 2010

In the previous article, we have discussed about the basics of Federated Search Results in SharePoint
In this article, we will discuss how to implement the Federated Search results in SharePoint 2010.
Go to Central Administration of the SharePoint Server -> Application Management -> Manage service applications
You will see a list of services. In that Select Search Service Application
Clicking on this, you will be re-directed to the Search Server Administration page. In the left navigation, you will see some menus as shown below. Select Federated Results in the left navigation menu. You will see a page, where you will find options for creating a New Location for Federated search or you can import the FLD file through Import Locationoption.
Clicking on the New Location option you will see the following page, where we will configure your Federated Location as shown below
That’s it. I have added the FLD file at the end of the article, for download so that you can download and import t…

Federated Search Results in SharePoint

In this article, we are going to discuss about another interesting topic called Federated Search which came up with the MOSS (Microsoft Office SharePoint Server), when Microsoft updated the Infrastructure in SharePoint.

What is Federated Search? Federate - Characterized by unity or being or joined into a single entity
Federation allows users to send the same query (search keyword) to multiple independent repositories, and display the results from each in its own region on a results page.

1. It is helpful, when the search data is stored in the multiple repositories or to display results from various locations
2. We can bring the results from various social networking sites (Twitter, YouTube, Flickr etc.,) and search engines (Google, Bing, Yahoo, etc.,) easily in our search results page
3. Displaying the results from various sites and search engines allows the user to view the results from different source in a single page
4. We can display different types of results like Sites, Im…

How to Remove “+ Add document" from a SharePoint 2010 Document Library

In previous article, we have learned how to hide the Select/ Deselect Check Box from a view in the list/libraries.
In this post, we will see how to remove the “+ Add document” option from the document library in SharePoint 2010.
We will get some scenarios where, we will display the document library I different view and in that, we don’t want this option to be shown to the users. Because, it will allow the users to upload the documents.
Suppose the below is the document library where we want to hide the Add document option

We can achieve this by the following methods 1.Editing the WebPart
2.Using SharePoint Designer(CSS)
3.Using J Query
4.By Permission level(Default)

1. Editing the WebPart
Go to Edit WebPart -> Tool bar Type -> Select NoToolBar option which will hide the Add Document option 2. Using SharePoint Designer(CSS)
Go to the designer and edit the page/webpart where you want to hide. Search for class=”ms-addnew” and change the style to Style=”display:none” 3. Using J Query
Add a CEWP a…

How to hide the Select and Deselect Check box in a List/Library in SharePoint 2010

We might have faced some situations where you want to hide the Select and Deselect Option Check Box in the SharePoint 2010.
This is required, when you create some views and want to display some items with out check box options.
Let’s discuss about this in this article.
Suppose this is the document library where I want to hide the checkbox

Go to the Modify view in the Ribbon
You will see all the options for customizing the list\library. Click On the Tabular View. Here you will find that, “Allow Individual Item Checkboxes” option is selected.
Unselect the Check Box and you are done. Now, you won’t see the Check Boxes in the list\Library as shown below
We can do this in SharePoint Designer also.
Go to the List/Library and then to the view where you want to hide the checkbox. Find the below section (.ms-WPHeaderTdSelection) and make this property to display equal to none.

.ms-WPHeaderTdSelection { Display:none; } That’s it. We have learned to hide the checkbox in lists and libraries of SharePoint …