Deleting items from a Infopath Listbox - InfoPath Dev
in

InfoPath Dev

Deleting items from a Infopath Listbox

Last post 09-30-2008 11:01 PM by sandhyapati. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-28-2008 12:51 AM

    Deleting items from a Infopath Listbox

    Hi All, I am currently using Infopath Listbox and populating its items from SharePoint list. I want to clear all the items in this list box on a button click. Could any one suggest me how to clear all the items. I am trying to iterate through the NamesGroup folder which is of repeating type. It has two fields Value and Display Name which are linked to my list box. XPathNodeIterator xnNodeIterator = xnOneLevelBelow.Select("/my:myFields/my:NamesGroup", nsManager); while(xnNodeIterator.MoveNext()) { xnNodeIterator.Current.DeleteSelf(); if(xnNodeIterator.Current.HasChildren) xnNodeIterator.Current.MoveToFirstChild(); } I want to delete all the items in the list box. When I execute the code, it is giving me an error and the list box becomes unusable. I mean it does not allow me to add new items to it. Any help would be helpful. Thanks Regards Sridhar

    Filed under:
  • 09-30-2008 11:01 PM In reply to

    Re: Deleting items from a Infopath Listbox

    Hi srivoleti,

    Can you go through the below link

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2133553&SiteID=1

    I hope it might help you.

    Thanks,
    Sandhya


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