Access data from button click event - InfoPath Dev
in

InfoPath Dev

Access data from button click event

Last post 12-11-2012 12:59 AM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-05-2012 08:16 AM

    Access data from button click event

    I have a button in a repeating section. When the code executes, I'd like to reference siblings of a parent node, but in the ClickedEventArgs of "e" there is only data from the current node.

         Devices
             Device[1] (repeating group)
             Summaries
                 Summary (repeating group)
                     Summary fields...
             Device[2]
                 Summaries
                     Summary
                     Summary fields...

    The button is in a repeating section bound to the repeating group Summary. If the button is pressed in the Summary section of Device[1], I need to access data in Device[2]. Can I do this?

    Paul

  • 12-11-2012 12:59 AM In reply to

    Re: Access data from button click event

    If e.Site is positioned at Summary, then you should be able to access the next sibling of the corresponding Device with:

    e.Site.SelectSingleNode("../../following-sibling::my:Device", NamespaceManager)

    Or access all of the following siblings with:

    e.Site.Select("../../following-sibling::my:Device", NamespaceManager)

    For preceding siblings, you would use preceding-sibling instead of following-sibling.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.