none
Use a xsltlistview created in Sharepoint Designer in Sharepoint?

    Question

  • I created a page in SPD ,dragged a list from the data source menu  and then I modified it, changing the order of items,sorting and formatting,etc.  Because this is something that needs to be created each month using different lists (I'll have a list for April,May,etc but with the same columns), I wanted to create a webpart so I wouldn't have to redo all the formatting,etc in SP Designer.

    So, I exported it from Sharepoint and tried to use it with a different list. When I edit the list to change the source to the different list I want, it lets me do it, but it pretty much ignores it and continues to refer to the older list.  Is it possible to do what I am trying?  How do I accomplish this?

    thanks!


    mhoran

    Saturday, March 31, 2012 12:15 AM

Answers

  • Hi,

    You can find the specific error message with the correlation ID in ULS log.

    Why did you remove the properities for listid  and listname?

    You just edit the listid and listname value to your current list in the .webpart file or in the XsltListViewWebPart  control on the page.


    Xue-mei Chang

    TechNet Community Support

    • Marked as answer by mhoran Tuesday, August 21, 2012 9:46 PM
    Thursday, April 05, 2012 9:42 AM

All replies

  • Hi,

    When you design a web part from SPD and export, it contain some reference to the underlying original list that used to create the web part. So after exporting the .webpart file you need to open up it in notepad or a text editor and search for ListId property. You can completely remove this property (just delete the complete property entry) Also check for the ListName property, it should contain a GUID as well, you can remove that property too. Then what will happen is when the web part is in use, it will start picking the ListName parameter binding that you have specified in the web part as the list for the data source. (I assume you have change the XSLT ListID parameter to ListName)

    • Proposed as answer by Huzefa Mala Saturday, March 31, 2012 6:19 AM
    Saturday, March 31, 2012 5:10 AM
  • hi,

    I tried it, but I get warnings that it is unable to display the webpart and gives me a correlation ID value. I did remove the properties for listid and listname.  Maybe there is something else in there referencing the guid?  I'll try opening it in SP designer to see what else it tells me.  When I try to add the webpart I modified using SP Designer, it gives me this message:

    'soap:ServerException of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.An error has occurred.'

    thanks

    


    mhoran


    • Edited by mhoran Monday, April 02, 2012 5:01 PM
    Monday, April 02, 2012 4:49 PM
  • Hi,

    You can find the specific error message with the correlation ID in ULS log.

    Why did you remove the properities for listid  and listname?

    You just edit the listid and listname value to your current list in the .webpart file or in the XsltListViewWebPart  control on the page.


    Xue-mei Chang

    TechNet Community Support

    • Marked as answer by mhoran Tuesday, August 21, 2012 9:46 PM
    Thursday, April 05, 2012 9:42 AM
  • Hi,

    I removed them because of what"Kamil" answered above. Maybe I misunderstood him.

    I'll check for the error in the log. Thank you.


    mhoran

    Thursday, April 05, 2012 3:32 PM