Archive for the ‘List View Web part’ Category

I tried creating a view for a list which has a date column in it. I wanted to group by the date column which is basically a DateTime type of column.

But once I finished creating the view I encountered an error <Render Failed> where the items should be displayed in the webpart.

Even though i didn’t  found any solution for that there is a workaround. I found that, in group by options I have selected “Collapsed” by default. Changing that to “Expanded” does it all.

PS : If you have found a solution for this, please do post it in the comments space.


There are some rare scenarios where you want group-by for more than 2 columns in list view of SharePoint list. But by default SharePoint doesn’t provide this function. OOB you can do a group-by for at-most 2 columns.So how we can go for it??

Here’s a simple way using SharePoint Designer along with some changes & additions. No customization / no code  required. Here we go.

1) Create a view for your list without any filtering or sorting.

2) Now open SharePoint designer and open the view you have created.

3) Right-click on the default ListViewWebpart that displays the content of list & and select Convert to XSLT Data View.

4) At this point the data will be displayed using a DataViewWebpart and from now on

  • You cannot edit any of the details of the view from the browser except its name.
  • Can be edited only from designer.
  • You can also use Site Actions, Edit Page, Modify Shared Web Part to hand edit the XSLT from the browser.
  • New columns added to the list hereafter will not appear in the view.

5) Now its time to make group by for the required columns. (In my case the three columns that has to be grouped ion order are IDU, Location & Title respectively).

6) Right-click on the DataViewWebpart and select Show Common Control Tasks and then select Sort & Group option that appear on the Common Data View Tasks pop-up menu.

7) On the Sort & Group settings do the following

  • Remove any sorted fields already available (ID column will be the one).
  • Now select & add all the three Group By columns in order to the Sort Order box.
  • Click “Show group header”.
  • Click “Show group footer” (This displays the count with totals).

8 ) Now click OK and if you save the page and check the page in browser you will be having group by but the columns will have wrong count.

9) This is due to the sort expression for the columns we have added and hence a small change is required.

10) So do the step 6 again, Click on the Edit Sort Expression button for the first column you have added (In my case its IDU).

11) In the Edit the XPath Expression text box make sure it shows as @IDU.

12) Now at a minimum you will need to concatenate the current grouping column with the previous grouping columns.

13) So for the second column I am changing the sort expression to concat(@IDU,’-‘,@Location) & for the third column to concat(@IDU,’-‘,@Location,’-‘,@Title.

14) Now verify once the sort columns are in the same order (Most probably it will change).

15) That’s it. Save the page and view the page in browser.

16) Now the view will be with default gray back ground.

17) You can change the color by selecting the td’s in the code view and choosing appropriate color.

Its done 🙂

What is a List View?

The concept of List View has been around since SharePoint v2.  While there are other technologies being used for visualizing list data in different scenarios (e.g. Content Query Web Part), List View remains the default component for displaying list data in SharePoint 2010.

List Views can be spotted everywhere in SharePoint.  They are used to display information such as your announcements, tasks and calendar schedules.


What’s the change in 2010?

In 2010, Microsoft introduced a component called the XSLT List View Web Part (XLV) that serves as the new default technology for displaying list data.  This honor used to belong to the List View Web Part (LVWP), which was the default from SharePoint v2 to 2007.  (Note: LVWPs are still supported in SharePoint 2010, but just not as widely used as the new XLV.)  The new XLV brings a ton of improvements to the SharePoint platform.

What are the key benefits to the new List Views (XLV)?

  • More Designer Friendly
    • Rich customization support through SharePoint Designer (SPD) while preserving browser UI experience
      • In SharePoint 2007, two of the main web parts for displaying list data were LVWP and the DataFormWebPart (DFWP).  Both had their own advantages and disadvantages.  The LVWPs were fully integrated into the browser with in-browser editing support, but lacked rich customization experience as they were not fully customizable inside SharePoint Designer 2007.  The DFWPs had a much richer customization story as they were fully editable inside SharePoint Designer, but lacked the in-browser editing capabilities that LVWPs had.  With the new XLV, SharePoint combined the best aspects of these two technologies and now allow you to richly customize your XLVs in SPD and also provide the in-browser editing experience.  It is important to note that XLV will preserve both SPD customizations and in-browser modifications, and not blow any of that away.
    • Extensible and shareable custom styles
      • A custom view style that you designed in SPD can now be easily shared with other designers across your site collection.
    • Popular designer features such as Conditional Formatting.
      • Similar to the Conditional Formatting feature in Excel, designer can now set conditions on when to format items in a list view (e.g. KPIs.)
  • More Developer Friendly
    • Uses standards-based XSLT instead of CAML
    • Easily extensible
      • Developers no longer have to include large blobs of CAML to define views in their List definitions.  Take advantage of shared XSLT used to define out-of-box views and only define custom XSL for the sections you want.
  • More End-User Friendly
    • Enhanced user experience including Ribbon UI and new multi-selection model.
      • Bulk editing and deletion are now supported.
    • Inline editing support
      • Edit fields in your list view without being directed to another page or dialog.
  • More Robust Ways to Access Data
    • Display enterprise data through Business Connectivity Services (BCS)
      • End users can now interact with business data similar to how they interact with regular SharePoint list data.
    • Cross-web list views displaying data from another web
    • Display list data joined from different lists