Archive | March 2009

Creating Custom List form

We know that a list or library consists of pages like Newform.aspx, DispForm.aspx, EditForm.aspx and so-on. In some cases,we may need to create our own Custom pages for Lists.There are two ways of doing this.

One way is to create a new page and associate the page with the list.Another way, is to modifying the existing pages using Sharepoint Designer which is the topic of discussion.

Steps Includes :

1.Go to the list/lib for which you need to create custom page(In our case Announcement list) and open the page to be modified(DispForm.aspx in this case) .You will see something like this.

2.Now,navigate to the web part zone of the list form web part and make it invisible.

The idea here is to make it invisible and add the customized list details.

3.Now, go to Insert Menu > Sharepoint Controls to add the Custom List form ,when you will be prompted with dailog box like this :

Here, choose the List/lib that you are customizing and the type of form to create (in our case it is Display Item form) and make sure to include standard toolbar as well.

4.Now,we have new List form that is ready to get customized.Lets take a scenario where we need to hide some fields like Contact Details while displaying details of a customer.

5.To hide a row (lets say expiray date in announcement list) select the row and modify the definition for the row :

It can be seen that i have modified the styles ,where i’m setting visiblity properties for that row as false.Save the page once it is done.

5.Now open the page in the site.It can be seem that our changes have been reflected in the page(cannot see the Expire row in the page).

We can use this approachto modify any of the existing list/lib pages and customize it accordingly.

Hiding Menu Bar in Web Part

I was wondering how to remove the properties menu for a web part , once it is deployed in a sharepoint Site, so that it can’t be personalized for any user ( not even by the administrator of that site) .

Later, i found a work around for this..which happens to be relatively simple than what i thought could be.

Open the page using Sharepoint designer ,navigate to the web part zone and add the enclosed code in the web part zone

PartChromeType=”None” AllowLayoutChange=”false” MinimizeVerb-Enabled=”false” MinimizeVerb-Visible=”false” AllowPersonalization=”false”

Now,save the changes and verify the same in the site.