Skip to main content

Create Filter with the SharePoint List

Dear All,

Here is the tutorial for the Filter record in SharPoint, Original Post: http://office.microsoft.com/en-001/sharepoint-server-help/connect-a-filter-web-part-to-a-list-view-web-part-HA010250989.aspx#BMs0

How to make the date filter range in  filter
http://www.bjw.co.nz/developer/sharepoint-2010/101-list-filtering-by-date-range


You can configure a filter Web Part to pass a value to a List View Web Part, and then change the view of data in the list based on the value. For example, when you select from a list of product orders in a Choice Filter Web Part, an adjacent List View Web Part can display the products that correspond to that order.
What do you want to do?
Learn about connecting a filter Web Part to a List View Web Part
Connect a Text Filter Web Part to a List View Web Part
Connect a Date Filter Web Part to a List View Web Part
Connect a Choice Filter Web Part to a List View Web Part
Connect a Current User Filter Web Part to a List View Web Part
Connect a SharePoint List Filter Web Part to a List View Web Part
Learn about connecting a Filter Web Part to a List View Web Part

This section discusses the ways that you can filter a List View Web Part, and best practices when you design and edit a Web Part Page that contains connections between filter Web Parts and List View Web Parts.
How filter Web Parts work

In general, connecting a filter Web Part to a List View Web Part works in the following way:


Connect a filter Web Part to a List View Web Part to display a subset of data.
The filter Web Part provides a value.
The filter value is passed to a column in the List View Web Part by using a Web Part connection.
The List View Web Part displays only those columns that match the filter value.
Ways to filter a List View Web Part

You can connect a filter Web Part to a List View Web Part so that a user can filter items based on a value in a column in the following ways:
Text filter A text value that can be any string, including letters, characters, and numbers.
Date filter A date value of month, day, and year. A user can also enter the exact date by clicking a date picker button.
Choice filter A predefined list of values and optional descriptions, such as product or status codes.
Current user The current user name, or other information based on the current user's profile, such as user name, department, or birthday. This Web Part is a context Web Part, which means that it is not visible to a user of the Web Part Page and the results appear automatically without user input.
SharePoint list A list of unique values and optional descriptions, such as product or status codes, generated from a column in a SharePoint list. This Web Part is similar in behavior to the Choice Filter Web Part, and is useful when you have a list of values that might change over time and you want an easier way to maintain the list without having to change the Web Part properties.

NOTES

In the Add Web Parts dialog box or a Web Part Gallery, you don't see the term, "List View Web Part". Instead, you see SharePoint lists and libraries that you can add to a Web Part Page as a List View Web Part.
You can connect a filter Web Part to a List View Web Part only in standard list view, not in datasheet view.
You can pass only one value at a time to a List View Web Part. You can configure only one connection at a time between a filter Web Part and a List View Web Part. However, you can add multiple instances of the same List View Web Part to a Web Part Page, and then configure a different connection to each List View Web Part. If you want to configure two or more connections at a time for a Web Part, consider using the Data view Web Part. Find links to more information in the See Also section.
Best practices for designing and maintaining Web Part Pages

Here are a few best practices to follow as you design and maintain Web Part Pages:
Choose your Web Part Page template carefully You can move Web Parts around on a Web Part Page to place them in any order and in any Web Part zone that you want. However, before you create a Web Part Page, think carefully about the template that you choose so that you can lay out the filter and List View Web Parts the way you want. When using a Web browser, you cannot change the template that you selected after you created the Web Part Page. If you have a Web design program such as Microsoft Office SharePoint Designer 2007, you can further change the structure of the Web Part Page.
Remove connections to disabled Web Part properties In page edit mode, you can see which filter Web Parts are currently connected and how they are connected by a message that is displayed underneath the filter Web Part.

In some cases, you may need to remove the connection to make a change to a disabled filter Web Part property. If this is the case, in the tool pane you see the following message to remind you:

"You must remove the connection between the Web Parts to make changes to disabled properties."
Remove unused Web Parts from the Web Part Page If you inadvertently close a Web Part, rather than delete it, the Web Part remains on the page as a hidden Web Part. To find hidden Web Parts, find the Web Part Page in the document library in which it is stored, point to the file name of the Web Part, click the arrow that appears, click Edit Properties, and then click the Open Web Part Page in maintenance view link. For more information about maintaining Web Parts, see Customize Web Parts.

TOP OF PAGE
Connect a Text Filter Web Part to a List View Web Part
NOTE The following procedure assumes you are creating a Web Part Page on a team site. Commands and instructions can vary on other sites.

Prepare the Web Part Page:
Do one of the following:
To create a Web Part Page, on the Site Actions menu , click Create, and then click Web Part Page.

For more information, see Introduction to customizing pages by using Web Parts.
To edit the Web Part Page, click Site Actions , and then click Edit Page.

The Web Part Page is displayed in Edit Mode.
In the Web Part zone where you want to add the Web Part, click Add a Web Part.

The Add Web Parts dialog box appears.
Add the Text Filter Web Part and the List View Web Part to the Web Part Page.

For more information about how to add a Web Part to a page, see Add or remove a Web Part.

Customize the Text Filter Web Part:
In the Text Filter Web Part, click the Open the tool pane link.

The Text Filter Web Part enters Edit Mode, and the Web Part tool pane appears.
Edit the custom Web Part properties by doing the following:
Enter a name in the Filter Name box to identify the Web Part.

You can also use the name as a label or a brief instruction to the user. For example, you can use Filter Reports By:as a label to tell users they can filter the view of a Reports list.
Optionally, in the Advanced Filter Options section, do one or more of the following:
To limit the number of characters, enter the number in the Maximum number of characters text box. The maximum length of a text value is 255 characters.
To enter an initial value in the Text Filter Web Part text box, enter a default value in the Default Valuebox. This default value is then used to display the initial list of values in the List View Web Part when the Web Part Page first appears.
To display a message that reminds the user to make a choice to filter the data, select the Require user to choose a value check box.
In the Control width in pixels text box, enter a number indicating the width of the text box as the number of pixels, or an empty value or "0" to automatically size the text box. Because the value entered by the user appears in this text box, you probably want to make it wide enough for the largest possible value.
To save the changes, click OK at the bottom of the Web Part tool pane.

Customize the List View Web Part:
Click the Web Part menu for the List View Web Part, and then point to Modify Shared Web Part.

The List View Web Part enters Edit Mode, and the Web Part tool pane appears.
Edit the custom Web Part properties by doing the following:
To change the default view of the list, select a different view from the Selected View list box. For example, you may want to filter, sort, or group data a different way or display different columns.

Alternatively, click Edit the current view to edit the current view of the list.

NOTE Whenever you select or edit a list view, a copy of the list design is made from the original site list design and saved with the List View Web Part. However, the list data remains the same.

Be careful when you switch to a different view from the current view. You may delete changes that you made to the current view and may disable Web Part connections that depend on columns in the current view. You are prompted for confirmation if you switch views.
To change the toolbar, under ToolBar Type, select Full Toolbar, Summary Toolbar, or No Toolbar from the list box.
To save your changes, click OK at the bottom of the Web Part tool pane.

Connect both Web Parts and verify the results:
Click the Web Part menu for the Text Filter Web Part, point to Connections, point to Send Filter Values To, and then click the name of the List View Web Part to which you want to link.
In the Configure Connection dialog box, select the column that you want to filter in the List View Web Part, and then click Finish.
To exit Edit Mode and view the page, at the top of the Web Part Page, under the Site Actions menu, click Exit Edit Mode.
To dynamically change the results that appear in the List View Web Part, enter some text in the text box for the Text Filter Web Part. Ensure that the text exactly matches a value in the column in the List View Web Part that you specified in the connection you made in step 10. After you enter the text, press ENTER to see the results.

NOTE The Text Filter Web Part does not recognize wildcard characters. If a user enters a wildcard character, such as an asterisk (*) or a percent sign (%), the character is interpreted as a literal character.

To redisplay all the values in the List View Web Part, the user must clear the text box, and then press ENTER.

TOP OF PAGE
Connect a Date Filter Web Part to a List View Web Part

NOTE The following procedure assumes you are creating a Web Part Page on a team site. Commands and instructions can vary on other sites.

Prepare the Web Part Page:
Do one of the following:
To create a Web Part Page, on the Site Actions menu , click Create, and then click Web Part Page.

For more information, see Introduction to customizing pages by using Web Parts.
To edit the Web Part Page, click Site Actions , and then click Edit Page.

The Web Part Page is displayed in Edit Mode.
In the Web Part zone where you want to add the Web Part, click Add a Web Part.

The Add Web Parts dialog box appears.
Add the Date Filter Web Part and the List View Web Part to the Web Part Page.

For more information about how to add a Web Part to a page, see Add or remove a Web Part.

Customize the Date Filter Web Part:
In the Date Filter Web Part, click the Open the tool pane link.

The Date Filter Web Part enters Edit Mode, and the Web Part tool pane appears.
Edit the custom Web Part properties by doing the following:
Enter a name in the Filter Name box to identify the Web Part.

You can also use the name as a label or brief instruction to the user. For example, you can use Filter Reports By: as a label to tell users they can filter the view of a Reports list.
To enter an initial value in the Date Filter Web Part text box, select Default Value, and then do one of the following:
Select Specific Date, and then enter a specific date.
Select Offset from today, and then enter the number of days in the Days text box. The maximum value is 999.

This default value is then used to display the initial list of values in the List View Web Part when the Web Part Page first displays.
Optionally, in the Advanced Filter Options section, to display a message that reminds the user to make a choice to filter the data, select the Require user to choose a value check box.
To save the changes, click OK at the bottom of the Web Part tool pane.

Customize the List View Web Part:
Click the Web Part menu for the List View Web Part, and then point to Modify Shared Web Part.

The List View Web Part enters Edit Mode, and the Web Part tool pane appears.
Edit the custom Web Part properties by doing the following:
To change the default list, select a different view from the Selected View list box. For example, you may want to filter, sort, or group data a different way or display different columns.

Alternatively, click Edit the current view to edit the current view.

NOTE Whenever you select or edit a list view, a copy of the list design is made from the original site list design and saved with the List View Web Part. However, the list data remains the same.

Be careful when you switch to a different view from the current view. You may delete changes that you made to the current view and may disable Web Part connections that depend on columns in the current view. You are prompted for confirmation if you switch views.
To change the toolbar, under ToolBar Type, select Full Toolbar, Summary Toolbar, or No Toolbar from the list box.
To save the changes, click OK at the bottom of the Web Part tool pane.

Connect both Web Parts and verify the results:
Click the Web Part menu for the Date Filter Web Part, point to Connections, point to Send Filter Values To, and then click the name of the List View Web Part to which you want to link.
In the Configure Connection dialog box, select the column that you want to filter in the List View Web Part, and then click Finish.
To exit Edit Mode and view the page, at the top of the Web Part Page, under the Site Actions menu, click Exit Edit Mode.
To dynamically change the results that appear in the List View Web Part, enter a date or click the Date picker button, and then press ENTER. The value that you enter must exactly match a value in the column in the List View Web Part that you specified in the connection you made in step 10.

NOTE A user needs to enter the date in the short date format for the current regional setting used by the SharePoint site. The short date format can vary depending on your computer or server site's regional setting. For example, for English (United States) use mm/dd/yyyy, and for French (France) use dd/mm/yyyy. The user can also use the date picker to ensure the correct date entry.

For more information about regional settings, see Working in international environments.

To redisplay all the values in the List View Web Part, the user must clear the date from the text box, and then press ENTER.

TOP OF PAGE
Connect a Choice Filter Web Part to a List view Web Part

NOTE The following procedure assumes you are creating a Web Part Page on a team site. Commands and instructions can vary on other sites.

Prepare the Web Part Page:
Do one of the following:
To create a Web Part Page, on the Site Actions menu , click Create, and then click Web Part Page.

For more information, see Introduction to customizing pages by using Web Parts.
To edit the Web Part Page, click Site Actions , and then click Edit Page.

The Web Part Page appears in Edit Mode.
In the Web Part zone where you want to add the Web Part, click Add a Web Part.

The Add Web Parts dialog box appears.
Add the Choice Filter Web Part and the List View Web Part to the Web Part Page.

For more information about how to add a Web Part to a page, see Add or remove a Web Part.

Customize the Choice Filter Web Part:
In the Choice Filter Web Part, click the Open the tool pane link.

The Choice Filter Web Part enters Edit Mode, and the Web Part tool pane appears.
Do the following:
Enter a name in the Filter Name box to identify the Web Part.

You can also use the name as a label or brief instruction to the user. For example, you can use Filter Reports By: as a label to tell users they can filter the view of a Reports list.
Enter the list of values and an optional description that you want a user to be able to select from theSelect Filter Value(s) dialog box that appears when a user clicks the Filter button. For example, if you have a list of customers with a Status column, you can enter Standard, Preferred, and Elite as the list of values, each value on a separate line. These values are then used to match the values that appear in the Status column of the List View Web Part when a user enters a value and presses ENTER.

For each value on each line, you can also add an alternative description that appears in the Select Filter Value(s)dialog box instead of the values when the user filters the data. For example:

Standard; A regular customer with an average credit rating
Preferred; A regular customer with a high credit rating
Elite; A high-volume customer with a high credit rating

NOTE The list of choices must contain at least one choice and must be unique. Neither value nor description may exceed 255 characters in length. The maximum number of choices is 1000.
Optionally, in the Advanced Filter Options section, do one or more of the following:
In the Control width in pixels text box, enter a number indicating the width of the choice text box as the number of pixels, or an empty value or "0" to automatically size the text box. Because the value entered by the user appears in this text box, you probably want to make it wide enough for the largest possible value.
To display a message that reminds the user to make a choice to filter the data, select the Require user to choose a value check box.
To enter an initial value in the Choice Filter Web Part text box, enter a default value in the Default Valuebox, a value that typically matches one of the values entered in step 2 of step 5. This default value is then used to display the initial list of values in the List View Web Part when the Web Part Page first appears.
To enable users to filter by a null value, select "(Empty)" value. For example, users may want to see all customers with no status defined.
To enable the clearing of a filter so that users can see all the values in the List View Web Part, selectAllow Multiple selections. In this case, the Select Filter Value(s) dialog box displays check boxes, rather than radio buttons.

NOTE You cannot use this feature to display the filtered results of two or more selections, because The List View Web Part does not support multiple selections. If a user chooses multiple selections, only the first selection is used.
To save the changes, click OK at the bottom of the Web Part tool pane.

Customize the List View Web Part:
Click the Web Part menu for the List View Web Part, and then point to Modify Shared Web Part.

The List View Web Part enters Edit Mode, and the Web Part tool pane appears.
Edit the custom Web Part properties by doing the following:
To change the default list, select a different view from the Selected View list box. For example, you may want to filter, sort, or group data a different way or display different columns.

Alternatively, click Edit the current view to edit the current view.

NOTE Whenever you select or edit a list view, a copy of the list design is made from the original site list design and saved with the List View Web Part. However, the list data remains the same.

Be careful when you switch to a different view from the current view. You may delete changes that you made to the current view and may disable Web Part connections that depend on columns in the current view. You are prompted for confirmation if you switch views.
To change the toolbar, under ToolBar Type, select Full Toolbar, Summary Toolbar, or No Toolbar from the list box.
To save the changes, click OK at the bottom of the Web Part tool pane.

Connect both Web Parts and verify the results:
Click the Web Part menu for the Choice Filter Web Part, point to Connections, point to Send Filter Values To, and then click the name of the List View Web Part to which you want to link.
In the Configure Connection dialog box, select the column that you want to filter in the List View Web Part, and then click Finish.
To exit Edit Mode and view the page, at the top of the Web Part Page, under the Site Actions menu, click Exit Edit Mode.
To dynamically change the results in the List View Web Part, in the Choice Filter Web Part, click Filter , click a value, and then click OK.

If you selected the Allow Multiple selections property, to redisplay all the values in the List View Web Part, the user must clear all the check boxes in the Select Filter Value(s) dialog box, and then click OK.

TOP OF PAGE
Connect a Current User Filter Web Part to a List View Web Part

NOTE The following procedure assumes you are creating a Web Part Page on a team site. Commands and instructions can vary on other sites.

Prepare the Web Part Page:
Do one of the following:
To create a Web Part Page, on the Site Actions menu , click Create, and then click Web Part Page.

For more information, see Introduction to customizing pages by using Web Parts.
To edit the Web Part Page, click Site Actions , and then click Edit Page.

The Web Part Page appears in Edit Mode.
In the Web Part zone where you want to add the Web Part, click Add a Web Part.

The Add Web Parts dialog box appears.
Add the Current User Filter Web Part and the List View Web Part to the Web Part Page.

For more information about how to add a Web Part to a page, see Add or remove a Web Part.

Customize the Current User Filter Web Part:
In the Current User Filter Web Part, click the Open the tool pane link.

The Current User Filter Web Part enters Edit Mode, and the Web Part tool pane appears.
Edit the custom Web Part properties by doing the following:
Enter a name in the Filter Name box to identify the Web Part.
Under Select value to provide, do one of the following:
To filter by the user name, select Current user name.
To filter by another value in the current user's SharePoint profile, select SharePoint profile value for current user, and then select an item from the list box.

The list box is populated with the list of all SharePoint profile properties that have a privacy policy of Everyone.

TIP An easy way to see a list of user profiles at your site is to display the MyProfile tab on My Site, and then edit the details.
Optionally, in the Advanced Filter Options section, do one or more of the following:
To enable users to filter by a null value, select Send empty if there are no values. For example, you may want to see if a profile value for that user is not entered in the column.
To decide how to handle more than one value, under When handling multiple values, do one of the following:
To pass only one value by using the Web Part connection, select Send only the first value.
To pass two or more values by using the Web Part connection, select Send all values.
To pass two or more delimited values by using the Web Part connection, select Combine them into a single value and delimit with, and then enter one or more characters in the text box.
To prefix a value to the Web Part property value to ensure a match to the column in the SharePoint list, enter text in the Text to insert before values text box.
To append a value at the end of the Web Part property value to ensure a match to the column in the SharePoint list, enter text in the Text to insert after values.
To save the changes, click OK at the bottom of the Web Part tool pane.

Customize the List View Web Part:
Click the Web Part menu for the List View Web Part, and then point to Modify Shared Web Part.

The List View Web Part enters Edit Mode, and the Web Part tool pane appears.
Edit the custom Web Part properties by doing the following:
To change the default list, select a different view from the Selected View list box. For example, you may want to filter, sort, or group data a different way or display different columns.

Alternatively, click Edit the current view to edit the current view.

NOTE Whenever you select or edit a list view, a copy of the list design is made from the original site list design and saved with the List View Web Part. However, the list data remains the same.

Be careful when you switch to a different view from the current view. You may delete changes that you made to the current view and may disable Web Part connections that depend on columns in the current view. You are prompted for confirmation if you switch views.
To change the toolbar, under ToolBar Type, select Full Toolbar, Summary Toolbar, or No Toolbar from the list box.
To save the changes, click OK at the bottom of the Web Part tool pane.

Connect both Web Parts and verify the results:
Click the Web Part menu for the Current User Filter Web Part, point to Connections, point to Send Filter Values To, and then click the name of the List View Web Part to which you want to link.
In the Configure Connection dialog box, select the column that you want to filter in the List View Web Part, and then click Finish.
To exit Edit Mode and view the page, at the top of the Web Part Page, under the Site Actions menu, click Exit Edit Mode.
To dynamically change the results in the List View Web Part, display the Web Part Page. Because the Current User Filter Web Part is a context Web Part, the results display automatically without user input.

TOP OF PAGE
Connect a SharePoint List Filter Web Part to a List View Web Part

NOTE The following procedure assumes you are creating a Web Part Page on a team site. Commands and instructions can vary on other sites.

Prepare the Web Part Page:
Do one of the following:
To create a Web Part Page, on the Site Actions menu , click Create, and then click Web Part Page.

For more information, see Introduction to customizing pages by using Web Parts.
To edit the Web Part Page, click Site Actions , and then click Edit Page.

The Web Part Page appears in Edit Mode.
In the Web Part zone where you want to add the Web Part, click Add a Web Part.

The Add Web Parts dialog box appears.
Add the SharePoint List Filter Web Part and the List View Web Part to the Web Part Page.

For more information about how to add a Web Part to a page, see Add or remove a Web Part.

Customize the SharePoint List Filter Web Part:
In the SharePoint List Filter Web Part, click the Open the tool pane link.

The SharePoint List Filter Web Part enters Edit Mode, and the Web Part tool pane appears.
Edit the custom Web Part properties by doing the following:
Enter a name in the Filter Name box to identify the Web Part.

You can also use the name as a label or brief instruction to the user. For example, you can use Filter Reports By: as a label to tell users they can filter the view of a Reports list.
To specify a SharePoint list, enter the URL of a list in the List box, or click Browse next to the text box and search for the list you want.
Optionally, to select a different list view, select an item from the View list box. For example, you may want to filter, sort, or group data a different way or display different columns.
Select a column from the Value field list box. The value column displays all supported columns from the list. Some columns are not supported, such as Title, Calculated, and Multiple lines of text.

IMPORTANT When you make the connection between the SharePoint List Filter Web Part and the List View Web Part in step 10, make sure you choose a column that has matching values to the Value field property.

NOTE A SharePoint List Filter Web Part has a limit of 100 items.
Optionally, select a column from the Description field list box. The description column is used to display an alternative value in the Select Filter Value(s) dialog box, which displays when a user clicks the Filter button. For example, if you have a Month number column that uses the numbers 1 though 12 as month values, you can use a Month Name column as the Description column so that January is displayed instead of 1, February instead of 2, and so on.
Optionally, in the Advanced Filter Options section, do one or more of the following:
In the Control width in pixels text box, enter a number indicating the width of the text box as the number of pixels, or an empty value or "0" to automatically size the SharePoint List Filter Web Part text box. Because the value entered by the user displays in this text box, you probably want to make it wide enough for the largest possible value.
To display a message that reminds the user to make a choice to filter the data, select the Require user to choose a value check box.
To enter an initial value in the text box, enter a default value in the Default Value box, a value that typically matches one of the values in the column specified in step 4 of step 5. This default value is then used to display the initial list of values in the List View Web Part when the Web Part Page first appears.
To enable users to filter by a null value, select "(Empty)" value. For example, users may want to see all values in a column that have no entry.
To enable the clearing of a filter so that users can see all the values in the List View Web Part, selectAllow Multiple selections.

The Select Filter Value(s) dialog box displays check boxes, rather than radio buttons.

NOTE A user cannot use this feature to display the filtered results of two or more selections, because The List View Web Part does not support multiple selections. If a user chooses multiple selections, only the first selection is used.
To save the changes, click OK at the bottom of the Web Part tool pane.

Customize the List View Web Part:
Click the Web Part menu for the List View Web Part, and then point to Modify Shared Web Part.

The List View Web Part enters Edit Mode, and the Web Part tool pane appears.
Edit the custom Web Part properties by doing the following:
To change the default list, select a different view from the Selected View list box. For example, you may want to filter, sort, or group data a different way or display different columns.

Alternatively, click Edit the current view to edit the current view.

NOTE Whenever you select or edit a list view, a copy of the list design is made from the original site list design and saved with the List View Web Part. However, the list data remains the same.

Be careful when you switch to a different view from the current view. You may delete changes that you made to the current view and may disable Web Part connections that depend on columns in the current view. You are prompted for confirmation if you switch views.
To change the toolbar, under ToolBar Type, select Full Toolbar, Summary Toolbar, or No Toolbar from the list box.
To save the changes, click OK at the bottom of the Web Part tool pane.

Connect both Web Parts and verify the results:
Click the Web Part menu for the SharePoint List Filter Web Part, point to Connections, point to Send Filter Values To, and then click the name of the List View Web Part to which you want to link.
In the Configure Connection dialog box, select the column that you want to filter in the List View Web Part from the list box, and then click Finish.
To exit Edit Mode and view the page, at the top of the Web Part Page, under the Site Actions menu, click Exit Edit Mode.
To dynamically change the results in the List View Web Part, in the SharePoint List Filter Web Part, click Filter , click a value, and then click OK.

If you selected the Allow Multiple selections property, to redisplay all the values in the List View Web Part, the user must clear all the check boxes, and then click OK.




Regards
Rashid Imran Bilgrami
CEO Best visualization
http://www.bestvisualization.com

Comments

Popular posts from this blog

Content Query Webpart Template In SharePoint 2013 and add new column in it

Dear All, Here is the easiest way to make add custom column under your content query web part and then you can format it as you want. Step 1:  Open Sharepoint design Step 2:  Open site for sharepoint parent site collection Step 3:  Locate the following folder Style Library > XLS Style Sheets Step 4:  Open "ItemStyle.xsl"  file Add the custom style sheet as you want <xsl:template name="[Your Style Name]" match="Row[@Style='[Your Style Name]']" mode="itemstyle">                                                   <xsl:param name="CurPos" />                                                     <xsl:variable name="SafeLinkUrl">                                                       <xsl:call-template name="OuterTemplate.GetSafeLink">                                                         <xsl:with-param name="UrlColumnName" select="'LinkU

Updatepanel or Enable Ajax in SharePoint webpart

Dear All It is really giving me a hard to get this techniques if you want to run the update panel in sharepoint 2013 webpart then you need to initialize the script manage by code   protected override void OnInit(EventArgs e)         {             base.OnInit(e);             InitializeControl();             // Register the ScriptManager             ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);             if (scriptManager == null)             {                 scriptManager = new ScriptManager();                 scriptManager.ID = "ScriptManager1";                 scriptManager.EnablePartialRendering = true;                 Controls.AddAt(0, scriptManager);             }         } In ascx page you need to add the following  <asp:UpdateProgress ID="UpdateProgress1" runat="server">     <ProgressTemplate>         <h1>Your progress value</h1>     </ProgressTemplate> </asp:U

SharePoint: A Complete Guide to Getting and Setting Fields using C#

Original article https://social.technet.microsoft.com/wiki/contents/articles/21801.sharepoint-a-complete-guide-to-getting-and-setting-fields-using-c.aspx Introduction This article demonstrates how to set and get the various SPField types for a SharePoint list using C#. The examples demonstrated set and get fields from an item that belongs to a custom list. The custom list contains a number of fields, and all the fields are named based on the type of field they are. For example, there is a Text field, which has been named, textfield. This is depicted in the following picture:   Applies To The examples demonstrated below are tested with and apply to the following versions of SharePoint: SharePoint 2010 SharePoint 2013 Get the List, and the first SPListItem This is the basic code for getting an item. If the list has at least one item, the first item is retrieved, otherwise a new item is created. var web = SPContext.Current.Site.RootWeb; var list = web.Lists.Try