none
Linking Data View Web Part to List Items RRS feed

  • Question

  • I'm working in SharePoint Online - Office 365 (so SharePoint 2013) and SharePoint Designer 2013.  I've inserted a Data View Web Part on a Wiki Page to display items from a custom list I created.  I'm wondering if it's possible to link the first column in the DVWP to the edit item form or display item form for each item in the related list.  I'm aware of the 'Inline Editing' option you can add to the DVWP...I don't want to be able to edit from the DVWP.  I want to navigate to the actual list item by clicking on the displayed item in the DVWP.  In other words, I'm wanting the items in the first column (the Item Title) to function as links to the list items' edit/display forms instead of just being a text display.  Is this possible in SPD 2013? 
    Tuesday, November 26, 2013 7:26 PM

Answers

  • Hi Krishana,

    Thank you for the link to that tutorial...however because I'm working in Sharepoint Designer 2013, I do not have a visual depiction of the Data View Web Part as the tutorial suggests I work from.  

    However, I did find a solution to the problem of using SPD 2013 to link the individual items in the DVWP to the edit/display item forms of the corresponding list item ...

    Find the lines of code that read:

    </xsl:if>
    <td class="ms-vb">
          <xsl:value-of select="@COLUMN TITLE"/>
    </td>

    select the <xsl:value-of select="@COLUMN TITLE YOU WANT HYPERLINKED"/> tag and in the 'Data Source Fields' window, click on the column you wish to be inserted as a hyperlink, then click the "Insert Selected Fields as" dropdown menu and select 'Formatted > Hyperlink'.  In the 'Text to Display' window write {@Title}.  In the 'Address' window write YOUR SHAREPOINT SITE/Lists/YOUR LIST NAME/DispForm.aspx?ID={@ID} for the display item form OR YOUR SHAREPOINT SITE/Lists/YOUR LIST NAME/EditForm.aspx?ID={@ID} for the edit item form.

    Easy enough!  

    (I referred to this Article by Microsoft: http://office.microsoft.com/en-us/sharepoint-designer-help/add-a-hyperlink-to-a-data-view-HA010240364.aspx)

    Thanks for the help!

    LLagan


    • Marked as answer by llagan Thursday, January 2, 2014 6:39 PM
    • Edited by llagan Tuesday, January 7, 2014 7:51 PM
    Thursday, January 2, 2014 6:38 PM

All replies

  • Hi llagan,

    You can create the cusomt view in that list and add the only one Link column Title in the view after that you can add the ListView webpart on the page and choose the custom view from the Edit webpart page property.

    I apologize if i did not understand your requirement clearly, would you mind to share little more information to come up with exact solution.


    Krishana Kumar http://www.mosstechnet-kk.com

    Wednesday, November 27, 2013 4:36 AM
  • Hi Krishana,

    Thank you for the reply.  I'm actually not working in a List View Web Part, but a Data View Web Part.  I am pulling data from a custom list and displaying it on a wiki page in a 'Table' format in a Data View Web Part.  When I'm in the original list (as in any typical list), when I click on the item Title for each list item, I am redirected to that single item's display form (where I can choose to edit that item).  However, the same data (item title) displayed in the Data View Web Part is not linked to the display form for each item.  It is just text.  What I'm wanting to achieve is the item Title displayed in the Data View Web Part serving as a link to the corresponding item's display form (as if I were clicking on that item from the original list).  Is this a possibility?

    Thanks in advance!

    Tuesday, December 3, 2013 4:56 PM
  • Hello llagan,

    Here are the steps by steps described details about how to add title column as hyperlink in Data View Web part, hope it would help you.

    https://www.nothingbutsharepoint.com/sites/eusp/pages/data-view-web-part-the-basics-add-a-hyperlink.aspx


    Krishana Kumar http://www.mosstechnet-kk.com

    Monday, December 9, 2013 2:22 AM
  • Hi Krishana,

    Thank you for the link to that tutorial...however because I'm working in Sharepoint Designer 2013, I do not have a visual depiction of the Data View Web Part as the tutorial suggests I work from.  

    However, I did find a solution to the problem of using SPD 2013 to link the individual items in the DVWP to the edit/display item forms of the corresponding list item ...

    Find the lines of code that read:

    </xsl:if>
    <td class="ms-vb">
          <xsl:value-of select="@COLUMN TITLE"/>
    </td>

    select the <xsl:value-of select="@COLUMN TITLE YOU WANT HYPERLINKED"/> tag and in the 'Data Source Fields' window, click on the column you wish to be inserted as a hyperlink, then click the "Insert Selected Fields as" dropdown menu and select 'Formatted > Hyperlink'.  In the 'Text to Display' window write {@Title}.  In the 'Address' window write YOUR SHAREPOINT SITE/Lists/YOUR LIST NAME/DispForm.aspx?ID={@ID} for the display item form OR YOUR SHAREPOINT SITE/Lists/YOUR LIST NAME/EditForm.aspx?ID={@ID} for the edit item form.

    Easy enough!  

    (I referred to this Article by Microsoft: http://office.microsoft.com/en-us/sharepoint-designer-help/add-a-hyperlink-to-a-data-view-HA010240364.aspx)

    Thanks for the help!

    LLagan


    • Marked as answer by llagan Thursday, January 2, 2014 6:39 PM
    • Edited by llagan Tuesday, January 7, 2014 7:51 PM
    Thursday, January 2, 2014 6:38 PM