Coding a Delete Button - nightmare - InfoPath Dev
in

InfoPath Dev

Coding a Delete Button - nightmare

Last post 10-07-2008 08:15 AM by mcalicea. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-29-2005 06:32 PM

    Coding a Delete Button - nightmare

    Gday,

    Im trying to code my own delete button which deletes the current selected record in a repeating table. This form acts as a front end to an Access DB stored on a network folder.


    function CTRL13_7::OnClick(eventObj)
    {

    var objXMLNode = XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:RegisteredPropertyOwner");
    XDocument.View.SelectNodes(objXMLNode);
    XDocument.View.ExecuteAction("xCollection::remove", "RegisteredPropertyOwner_2");

    }

    I am recieving the following error.:

    "Either the combination of values for the View.Select call is an invalid selection, or the values are not defined for this view, defined for this view more than once, or not selectable in the view... blah blah blah."

    Whats goin on?
    Cheers for your help
  • 09-30-2005 02:18 AM In reply to

    Re: Coding a Delete Button - nightmare

    var node = eventObj.Source;
    node.parentNode.removeChild(node);

    Try this it should work for you.

    Agni
    InfoPath Dev India
  • 10-02-2005 03:20 PM In reply to

    Re: Coding a Delete Button - nightmare

    Mate,

    Agni you are a legend, thanks for your help!
  • 10-03-2005 11:21 PM In reply to

    Re: Coding a Delete Button - nightmare

    :)

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 10-07-2008 08:15 AM In reply to

    Re: Coding a Delete Button - nightmare

    I am not very good with coding, but I was wondering how would this work with a record in a SQL DB?  And exactly how would that code look?  Thanks for any help with this.

     

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.