<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Controls</title><link>https://www.infopathdev.com:443/forums/43.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Deleting items from a Infopath Listbox</title><link>https://www.infopathdev.com:443/forums/thread/32678.aspx</link><pubDate>Wed, 01 Oct 2008 06:01:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32678</guid><dc:creator>sandhyapati</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32678.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=32678</wfw:commentRss><description>&lt;p&gt;Hi srivoleti, &lt;/p&gt;
&lt;p&gt;Can you go through the below link&lt;/p&gt;
&lt;p&gt;&lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2133553&amp;amp;SiteID=1"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2133553&amp;amp;SiteID=1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I hope it might help you.&lt;/p&gt;</description></item><item><title>Deleting items from a Infopath Listbox</title><link>https://www.infopathdev.com:443/forums/thread/32596.aspx</link><pubDate>Sun, 28 Sep 2008 07:51:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32596</guid><dc:creator>srivoleti_95</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32596.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=32596</wfw:commentRss><description>&lt;p&gt;
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(&amp;quot;/my:myFields/my:NamesGroup&amp;quot;, 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
&lt;/p&gt;</description></item></channel></rss>