Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

This is what I want to achieve (in SharePoint 2010):

  • A custom page containing 2 XsltListViewWebPart
  • Both of them rendering the same list data, but with different XSLT definition for display
  • I want to store the View definition separately (independent of these 2 webparts) so that I don't have to redefine (& adjust) the view everytime
  • Filter control(s) on the same page should be able to act on the View, updating both views at the same time.

How can I do this? My initial thought was:
- Define the View and save it as a separate CAML file
- Use XmlDefinitionLink and refer the URL of the CAML file in both XsltListViewWebPart controls

However, nobody seems to know how to use XmlDefinitionLink. Any ideas? Couple of Google search results only showed how frustrated users are with XmlDefinitionLink.

share|improve this question
add comment

2 Answers 2

check this link:

Filtering a XsltListViewWebPart that has "Send Row of Data To“ connection doesn’t work?

and

http://www.spsamples.com/2011/08/sharepoint-2010-filtering.html

or this:

http://benredl.wordpress.com/2010/11/30/using-the-xsltlistviewwebpart-with-a-custom-query/

share|improve this answer
2  
Welcome Exclusive to SharePoint StackExchange, while your answer may potentially answer the question, it doesn't explain why the links may be of use. Also the second two links being external blogs, they may be taken down, so an extract at the minimum highlighting the fix would be desirable. Please refer to the full FAQ[1] on how to use SharePoint StackExchange. ENJOY [1]: sharepoint.stackexchange.com/faq –  Hugh Wood Nov 29 '12 at 9:53
add comment

When you say "different XSLT Definition", do you mean the view or the XSL ?

If you mean the view: XSLTListViewWebParts, if they're pointing to a list (because Document Libraries seem to act up apparently) can be pointed to one of the List's views. This way you don't have to define the view on the webpart. You can set it like so:

webpart.ViewGuid = view.ID.ToString("B").ToUpper();

where view is the list's SPView you want to use.

I think you can connect the filter controls to multiple webparts.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.