delete entry from repeater control - InfoPath Dev
in

InfoPath Dev

delete entry from repeater control

Last post 10-05-2005 10:40 PM by gaikwadsantosh. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 10-02-2005 10:29 PM

    delete entry from repeater control

    hi,
    i have a Repeater control on form which contains one textbox.
    i have two things to do with this repeater control.

    1. i want to put command button on form to remove selected item of repeating section.

    2. i want to read all the values from textboxes(from repeating section) which are inserted by user at runtime and display it in a listbox.

    can u please guide me.

    Thanks & Regards
    Santosh.
  • 10-03-2005 10:10 AM In reply to

    Re: delete entry from repeater control

    If you do not want to use the built in remove buttons you should look read up on XDocument.View.ExecuteAction method.

    As for the filling in of the listbox, it should be a simple as:
    - Going to your data source task pane
    - Dragging the repeating field onto the form
    - If it is text type, the default control will be a textbox. Right click the textbox and then select the list box control.
    - Then double click on the listbox to open the properties window.
    - Select the lookup options from's data source
    - In entries, select the repeating group node.
    - In value, select the field that you want to display.
    Jason
    http://www.k2distillery.com/
  • 10-03-2005 11:16 PM In reply to

    Re: delete entry from repeater control

    Thanks VT!

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 10-04-2005 11:41 PM In reply to

    Re: delete entry from repeater control

    hi,
    thanks for your reply
    if my delete button is in repeating section then following code works (which is told by agni)

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

    but in my case delete button is outside repeating section
    i tried following code

    XDocument.View.SelectNodes(XDocument.DOM.selectSingleNode("/my:myFields/my:group1/my:group2"));
    XDocument.View.ExecuteAction("xOptional::remove", "group2_1");

    dosent work.
    Please Help.

    Thanks & Regards
    Santosh
  • 10-05-2005 06:56 AM In reply to

    Re: delete entry from repeater control

    I think this is what you're trying to do:

    var repeatingTable = XDocument.DOM.selectNodes( "/my:myFields/my:group1/my:group2" );
    // remove all rows from the tables
    repeatingTable.removeAll();


    --OR--

    var node = XDocument.DOM.selectSingleNode( "my:myFields/my:group1/my:group2[my:id = 3]" );
    // remove single row from table
    node.parentNode.removeChild( node );



    ---------------
    Matt Faus
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 10-05-2005 10:40 PM In reply to

    Re: delete entry from repeater control

    Hi MFaus,

    you are simply great,
    it is working fine.
    Thanks very much.

    Thanks & Regards
    Santosh

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