Infopath Dropdown Control isnot work properly...Help - InfoPath Dev
in

InfoPath Dev

Infopath Dropdown Control isnot work properly...Help

Last post 12-30-2008 02:55 AM by Shiva. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 12-29-2008 09:54 AM

    Infopath Dropdown Control isnot work properly...Help

     I have a simple problem. I want to dynamically add the elements in dropdown list.I am using C# code

    XPathNavigator root = MainDataSource.CreateNavigator();
    root.SelectSingleNode("/my:myFields/my:field1",NamespaceManager).SetValue("Select a valuet...");

     

    .// /my:myFields/my:field1 it is xpath of Dropdown list

     

    It is not working properly.

    Pls help in this regard.

    Thanks in advance

  • 12-29-2008 07:37 PM In reply to

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

    Re: Infopath Dropdown Control isnot work properly...Help

    Hello,

    If we set the dropdown value dynamically using your code it will get added to dropdown list but if you select any other option then newly added option will be disapeared.

    You have add the secondary xml for dropdown values. If you adding this secondary xml we can add one more option to that secondary xml using code. If we update the secondary xml then it will get added.

    In dropdown properties, We have two more options to select the dropdown values.

    • 1. Look up values in the form's data source.
    • 2. Look up values from an external data source.
  • 12-29-2008 09:04 PM In reply to

    Re: Infopath Dropdown Control isnot work properly...Help

    thank u very much....

    One more problem arises when i connect my dropdown list to "Look up value from external data source " (External XML File) then one Blank data is added in the  Drop Down List. But if i use "Enter manually" interface to add the value it works well.

    I want to remove first Blank which is automatically  comes in DropDown List

    Please help... Thanks in Advance

     

     

  • 12-29-2008 09:19 PM In reply to

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

    Re: Infopath Dropdown Control isnot work properly...Help

    Hi,

     

    You cannot remove the blank value from dropdown. But you can set the default value to show the xml value instead of blank value. In this case blank value will be displayed in the dropdown but by default first value will be selected when you open new form.

    1. Go to data source in the task pane and Double click on dropdown field.
    2. Select Fx button for Default value.
    3. Select Insert field or group.
    4. Select secondary xml from data source.
    5. Select “value” and click on ok.

    Value --- your secondary xml field xpath

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 12-29-2008 10:58 PM In reply to

    Re: Infopath Dropdown Control isnot work properly...Help

     thanks a lot

  • 12-30-2008 02:55 AM In reply to

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

    Re: Infopath Dropdown Control isnot work properly...Help

    Hello,

    Glad to have provided some help in the right direction. We look forward to your participation.

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