changed event on repeating section - InfoPath Dev
in

InfoPath Dev

changed event on repeating section

Last post 01-01-2012 10:15 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-01-2012 07:21 PM

    changed event on repeating section

    Hello!

    I am trying to add some code so it can be triggered after a field(within a repeating section) is changed. but it only gets trigered for the first row and not the rest of them. below is what I have so far

    public void COUNT_1MM_Changed(object sender, XmlEventArgs e)

    {

    //create navigator for count field

    XPathNavigator COUNT_1MM = MainDataSource.CreateNavigator();

    COUNT_1MM = COUNT_1MM.SelectSingleNode("/my:myFFIM_base_table/my:Species_Records/my:SpeciesGroup/my:GROUP_1MM/my:GROUP_1MM_sub/my:COUNT_1MM", NamespaceManager);

    //create navigator for Species Id

    XPathNavigator SPECIES_ID = MainDataSource.CreateNavigator();

    SPECIES_ID = SPECIES_ID.SelectSingleNode("/my:myFFIM_base_table/my:Species_Records/my:SpeciesGroup/my:SPECIES_ID", NamespaceManager);

    if (SPECIES_ID.ToString() == "999990" && COUNT_1MM.ToString() != "" && COUNT_1MM.ToString() != "0")// check if species selected is NOSP and and count field is not blank and not 0

    {

    //if above statement is true then print this message

    MessageBox.Show("NOSP (No fish collected) was indicated. Number of fish should be 0.");

    COUNT_1MM.SetValue("0"); // set the count value to 0

    }

    any help would be greatly appreciated. Thanks.

  • 01-01-2012 10:15 PM In reply to

    Re: changed event on repeating section

    Hi Golden Shiner and welcome!

    Did you add the event handler to the parent or the child? I'm guessing it's associated with he child underneath the repeating parent group node. Please try adding it to the repeating parent group node.

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