joined subview - how to add Delete form action? RRS feed

  • Question

  • I created joined subview from two lists (Orders, ClientOrders). I added Edit and Display form action links (Orders). I have problem with delete action. Has anybody managed to do it?
    Tuesday, May 10, 2011 12:09 PM

All replies

  • Hi Simon17,

    As per your description it looks like you have created joined sub view using Data View web part with the help of SPD, right ?

    If yes then in the original source list do you assigned delete action on both the list or any cancel option to cancel orders ?

    Warm Regards, Pratik Vyas | SharePoint Consultant | http://sharepointpratik.blogspot.com/
    Tuesday, May 10, 2011 2:11 PM
  • Yes, I did exactly as You wrote.

    I was able to add only "Display" and "Edit" actions -


    <a href="../Order/Detail.aspx?ID={@ID}&IDO={$IDO}&Source=/Site/Lists/Order/Site.aspx?ID={$IDO}">Detail</a>
    <a href="../Order/Edit.aspx?ID={@ID}&IDO={$IDO}&Source=/Site/Lists/Order/Site.aspx?ID={$IDO}">Edit</a>


    This is how I tried to use Delete action -


    <a href="javascript: {ddwrt:GenFireServerEvent(concat('__cancel;__delete={',$KeyField,'=',$KeyValue,'};__commit'))}">Delete</a>
    <xsl:with-param name="KeyField">ID</xsl:with-param>
    <xsl:with-param name="KeyValue" Select="ddwrt:EscapeDelims(string(@ID))" />


    When I click on that action, I get error:

    Specified method is not supported.

    Stack Trace:

    [NotSupportedException: Specified method is not supported.]
       Microsoft.SharePoint.WebPartPages.DataFormWebPart.HierarchicalCommit() +904
       Microsoft.SharePoint.WebPartPages.DataFormWebPart.PerformCommit() +66
       Microsoft.SharePoint.WebPartPages.DataFormWebPart.HandleOnSave(Object sender, EventArgs e) +61
       Microsoft.SharePoint.WebPartPages.DataFormWebPart.RaisePostBackEvent(String eventArgument) +3651
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981


    I'm not sure, what are You asking of? There wouldn't be any problem to asign delete action button to original source list, eg. just for Orders or just to ClientOrders. The problem is with Joined subview. In Common Data View Tasks -> Data View Properties ->Editing Tab -> all options (Edit, Display and Delete) are greyed out. Anyway, I'm sure that there must be any way to add that Button :)

    Thursday, May 12, 2011 2:53 PM