Itrating through Drop Down List Please Help - InfoPath Dev
in

InfoPath Dev

Itrating through Drop Down List Please Help

Last post 01-05-2009 06:02 AM by swathip. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-05-2009 04:26 AM

    Itrating through Drop Down List Please Help

    I am entering data to the Dropdownlist "Enter the maually interface". Now I want to Itreate it and want to show the values in MessageBox.  When i implement it using external data source (XML file) then i am able to itrate the values in Drop Down List but I am not able to itrate the values from DDL when i use  "Enter the maually interface"  using Same Logic. My Logic is

    XPathNavigator root = MainDataSource.CreateNavigator();

    XPathNodeIterator iter = root.CreateNavigator().Select("/my:myFields/my:field4",NamespaceManager);

    // /my:myFields/my:field4 is XPATH of Drop Down Listwhile (iter.MoveNext())

    {

    MessageBox.Show(iter.Current.Value.ToString ());

    }

     Please Help me in this regard.

    Thanks in Advance

     

  • 01-05-2009 04:49 AM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: Itrating through Drop Down List Please Help

    Hi,

    Message box will not work directly in the browser form.

    Check out "Example 1" in this article: http://support.microsoft.com/kb/555990
    Alternatively, you could create sections with your messages and then
    show/hide them whenever necessary instead of using message boxes.

    Also verify below links.
    http://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/331767bd-375d-4655-a68d-da2a47016c80/
    http://www.infopathdev.com/forums/t/4714.aspx
    http://www.infopathdev.com/forums/t/8229.aspx

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 01-05-2009 05:19 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Itrating through Drop Down List Please Help

    Hello,

    You have to change your code as below to iterate the secondary drop list values,

    XPathNodeIterator iter = secondaryDOMRootNode.Select("XPath of your secondary drop down fields",NamespaceManager);

  • 01-05-2009 06:02 AM In reply to

    Re: Itrating through Drop Down List Please Help

    Hi,

    You cannot iterate through the drop down list when you enter that values manually. When you use

     XPathNodeIterator iter = root.CreateNavigator().Select("/my:myFields/my:field4",NamespaceManager);

    you will get only the value selected not all the values in the drop down list. If you want to iterate the values then you need to place the values in an xml file and look up values from an external data source in the drop down.

     

    Swathip
    www.ggktech.com
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.