How to read dropdownlist values in infopath form - InfoPath Dev
in

InfoPath Dev

How to read dropdownlist values in infopath form

Last post 03-22-2013 04:00 PM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-22-2013 07:59 AM

    How to read dropdownlist values in infopath form

    Hello folks, I have an InfoPath from which has two dropdownlist controls and a textbox. I have about 10 values in dropdownlist A and when I enter any field in textbox and hit submit, I should be able to read all the dropdownlist values of A into dropdownlist B along with new value from textbox as a new value. I'm having issue on how to read the values from dropdownlist A programmatically. I have tried the following way to read the items in the dropdownlist but it only gets me the first value of the dropdownlist.

     

    XPathNavigator navigator = node.CreateNavigator();

    XPathNodeIterator child = navigator.SelectChildren(XPathNodeType.Attribute);

    foreach (Object child in navigator.SelectChildren(XPathNodeType.Attribute))

    { string str = child.ToString();

    }

     

    -- smith

  • 03-22-2013 04:00 PM In reply to

    Re: How to read dropdownlist values in infopath form

     Not knowing what "node" is in your code makes it hard to help. :-)

    Is it the secondary data source that provides the values to your dropdown? If you run the code in debut, how many items are in "child"?

    Hilary Stoupa

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