Posts

Showing posts from July, 2013

XSLTListview VS DataFormWebpart

Applies to SharePoint 2013XSLTListview webpart was release with SharePoint 2010 to replace the Listview webpart which was used to display the list data in SharePoint 2007. It uses XSL and users can customize a lot of the XSLT and modify the look feel functionality which the LIisview webpart could not do. XSLTListview webpart works with lists and library but not with external lists.
Dataform webpart has always been around and is used to display data from list, library and external data sources as well.
Both dataform webpart and XSLT list view webpart can be customizable using XSLT for all sorts of things including Conditional formatting, sorting, filtering, grouping etc. SharePoint Designer is smart to user the right one depending on what you need it for and this is totally transparent to the user. When inserting a dataview in the page from Designer by selecting Dataview\ name of the list in the Ribbon, XSLT LIstview webpart is used whereas when Dataview\ Empty Dataview is selected…

Clearing filter selection on a DataView created by Filter Webparts

Image
Applies to SharePoint 2013After using filter webparts with a dataview you will soon realize that if you want to clear the filter so that you can see all the records in the dataview it just does not work, i.e. you have to select all the filters all the time. There is not way to remove filter from one of the filters while applying filter on another one. With that being said I would also like to mention that this problem is with Empty Dataview webpart ( which is using data form webaprt ) only and not with the Dataview webpart from a list (which is making use of XSLTListview webpart )Below is high level of what it takes to get it done and the rest of the post describes in detail :· Create a row in the list with the value (Show All) in the column on which you want to apply filter , in my case this dummy row will contain (show All) for both first name and last name. This is key to the mechanism.· Use XSLT Filtering instead of regular filter and do XPATH filtering. the problem with this appr…

Using Apply Filter Button webpart with multiple Filter webparts

Image
Applies to SharePoint 2013The good or bad thing about the filter webparts from the post above is that they do the filtering but instantaneously i.e as soon as I select firstname it applies the first name filter, then when I select lastname it does the last name filtering, at time this is not a good scenario specially in lists with a lot of data because it can cause the page to load real slow. And users want the filters to be applied only when they click on a button, the answer is the Apply Filter button.ON the same page right below the list filter webparts lets add Apply Filters button. The following tag is added This single step just changes the behavior of the list filter webparts to now apply the filter only when this button is clicked. The Apply Filter button lightens up every time a filter selection is change.Check out my below posts on DataView Webpart, leave me a comment if you find them useful Using Dataview Webpart with SharePoint 2013Difference between XsltListview webpart V…

Filtering XSLT List view webpart with Multiple SharePoint List filter webparts

Image
Applies to SharePoint 2013Here I am going to be using Empty Dataview webpart which is really DataFormWebpart.Create a new Page in SharePoint DesignerOpen in Advanced mode and attach a master page to itAdd the text for content holder Insert a webpart zone and add 2 SharePoint List Filter webparts with in the zone.Lets configure the 2 SharePoint list filter webparts to point to First Name and Last Name columns of the Contact List. This is done better in the Brower, so run the page by clicking the preview buttonEdit the page in the browser and configure the list filter webparts like belowConfigure the first filter to look like thisConfigure the second Filter Webpart to point to Last name. Now Drop an Empty DataView webpartThen drop a datasource , In my case I am selecting the ContactsList as the datasource. Drop it between the datasource tags in the dataview.Select the Column that you want from the DataSource Details view and insert them as Multi Item view.The XSLT code is going to explo…

Filtering XSLT List view web part with Text filter Web parts

Image
Applies to SharePoint 2013Out of the several different filter webparts let’s try using a Text filter webpartOn a new non-webpart page created form designer add a dataview webpart and select a listSelect a Text Filter webpartChange the filter name and Title name to something simpleWe are going to create a filter on Lastname, the dataview webpart will display all the contact that contain this last name. High level strategry to achive this is to create a lastname parameter in DataView webpart, apply filtering based on lastname in the XSLT listview webpart and finally pass the value of this parameter from the list filter webpart. Lets start with creating a parameter in the xsltlistview webpart , Applied filter using this parameterThis will add the following CAML query to the Query section, before applying the filter it was only <Query/>Now lets connect xslt listview webpart with text filter. With cursor in Contact List XSLTListview webpart click on ‘Add Connection’ and in the wizard…

Using Dataview Webpart with SharePoint 2013

Image
Using Dataview Webpart with SharePoint 2013Let’s go ahead and use a DataView webpart and discuss some of the basic options that it provides.Open SharePoint Designer 2013, connect to your site and create a new non-webpart page by clicking on New ASPX page in the folder in which you want to create the page.Open the page in Advanced Mode by rt. clicking on itSave the page, this is a good practice if not a lot of ribbon buttons are disabled. Keep doing this with any mods to the pages. Dataview webpart needs a webpart zone to render, drop a Webpart zone on it in between the form tagsAfter saving the page, go to the webpart zone tag and WebPartPages:WebPartZone and add DataViewWebpartVola! This has added the dataview webpart to the page, which is basically a lot of XSLT which we will go over very soon. Preview the page in the brower by clicking on the preview button.Check out my below posts on DataView Webpart, leave me a comment if you find them useful Using Dataview Webpart with SharePoin…