numbered repeating tables and get this numbers with dropdownlist change event? - InfoPath Dev
in

InfoPath Dev

numbered repeating tables and get this numbers with dropdownlist change event?

Last post 09-19-2008 03:01 AM by alicoskun. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-19-2008 12:42 AM

    numbered repeating tables and get this numbers with dropdownlist change event?

    Hello,

    I am new in infopath, i am giving numbers to the repeating tables, when user  click insert item than a new table comes and its number will become equipmentno: 2 and increasing, i want to take this number when the dropdownlist onchange event . i can get only table numbers with:

    string EquipmentNo ="";

    XPathNavigator nav = MainDataSource.CreateNavigator();

    XPathNodeIterator iter = nav.Select("/my:myFields/my:group3/my:group4/my:EquipmentNo", NamespaceManager);

    while (iter.MoveNext())

    {

     

    EquipmentNo = iter.Current.Value;

    }

    but this just give me the last euipmentno. now i want to take the table number which i change the dropdownlist value.

    ---------------------- 

    with button click event i can get the repeating table's number:

    public void CTRL151_7_Clicked(object sender, ClickedEventArgs e)

    {

     

    string str = e.Source.SelectSingleNode("my:EquipmentNo", NamespaceManager).Value;

     

    }

    but i want to get this value in dropdownlist changed event.
     public void EquipmentDDL_Changed(object sender, XmlEventArgs e)

    {

    }

    Any help would be appreciated , thanks,

    Ali

  • 09-19-2008 01:51 AM In reply to

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

    Re: numbered repeating tables and get this numbers with dropdownlist change event?

    Hello,

    If you want to increase the repeating table number when you change the drop down value then you have to write the code in drop down change event.

    Where do you want to set incremented repeating number value? For the last repeating node?

    Can you give more details on why do you want to increase the repeating table value for changing of drop down value? What is the schema structure for these repeating table and drop down node? By doing this if user this change will effect for every drop down value change. Is it your requirement?

  • 09-19-2008 03:01 AM In reply to

    Re: numbered repeating tables and get this numbers with dropdownlist change event?

    Thanks for the response Shiva,

    I found what i need. i just want to take the selected tables value in dropdownlist change event. with this code i can take it.

    #region Take the Equipment number

    string EquipmentNo = "";

    // Check if value has changed and not a table insertion

    if (e.Operation == XmlOperation.ValueChange)

    {

    // Get Current Row

    XPathNavigator xNavigator = e.Site;

    bool bParent = xNavigator.MoveToParent();

    // Get Reference to the Gross Value

    XPathNavigator xField = xNavigator.SelectSingleNode("my:EquipmentNo", this.NamespaceManager);

    EquipmentNo = xField.InnerXml;

    }

    #endregion

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