SharePoint 2010: How to change width of list column

In this post, I will be discussing about changing width of list column.

SharePoint auto calculate the column width depends on the content at time of rendering the page.

Here I am taking an example of list column with very long header.

  • Open your view/AllItems.aspx in SharePoint Designer.
  • Get cursor to your column in design mode and drag it to desired width you want.
  • Delete Nowrap=’Nowrap’ for this column and add below highlighted style.

This is how the fixed width column will render:

Hope that helps…!!

SharePoint 2010: Mobile View :Part 1

How to create mobile view for sharepoint list/library:

While creating/editiong normal view at the end in Mobile section,Check the checkbox (1) Enable this view for mobile access.

Here you can also choose other configuration like making it default mobile view (2),

How many items to display in one page (3) ,

Option to choose the field to display in simple view (4),

(5) in image is the url for mobile view.

How does it look on mobile :

Hope that helps…

Add/remove content type to SharePoint List

In this post I will discuss about how to add/remove content type to and from SharePoint list.

Add/remove Content type in SharePoint Designer:

when you open a list in SPD you will find Content Types section as shown in the figure below.

Once you select content type region you will find content type actions in the ribbon as well.

Add/remove content type programmaticaly:

In code I have removed “Folder” content type and added “Image” content type to the list. And so it should look like this in SharePoint designer.

Hope that helps…!!