Tuesday 10 June 2014

How to add Custom List View to SharePoint Page


Create New view for list from Web UI
Note down the name of the view. Ex: MyCustomView
Open SharePoint Designer
Open your site
Click on All Files
In the top ribbon click on File-->Aspx
Change the name of your aspx
Open aspx
Mouse hove after
<form id="form1" runat="server">
Click on Insert in the ribbon
Click on Data View
Select List which you want show in the page
You will able to see XmlDefination
You can find Url="/Lists/[listName]/AllItems.aspx"
Here you can change AllItem.Aspx to your Custom View.aspx
Ex:
You can find Url="/Lists/[listName]/MyCustomView.aspx"

We can do by Inserting webpart from Web UI.
First Create Custom View
Click Edit Page
Click Insert
Select WebPart
Select List and Libraries
Select your List
Click Add
Click Edit Web Part
You will get New Edit window
You will able to See: Selected View Drop down
Select your view
Click Ok