On AddNode - InfoPath Dev
in

InfoPath Dev

On AddNode

Last post 12-20-2005 04:13 AM by Osiris86. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-19-2005 05:57 AM

    On AddNode

    Hello,

    i'm searching for a EventHandler which handles the event when i add a new node to a repeating table. Is there something like this and how can i use it?

    Thanks very much

    Greez Osiris
  • 12-19-2005 07:51 AM In reply to

    Yes, you can add an eventhandler to an element in your repeating table. In the sample code below I check on deletes. In your case you will use eventObj.Operation = "Insert"

    Sub XXXX_OnBeforeChange(eventObj)
    If eventObj.IsUndoRedo = false AND eventObj.Operation = "Delete" Then
    'do something
    'eventObj.ReturnStatus = false
    End If
    End Sub

    Note, there are OnValidate, OnBeforeChange and OnAfterChange events. Read the help in InfoPath Script editor for more information. Note the OnValidate and OnBeforeChange have the DOM read-only and you cannot make any changes to other fields within this event. If you are adding logic that will update another element on insert, use the OnAfterChange event.
    Jason
    http://www.k2distillery.com/
  • 12-20-2005 04:13 AM In reply to

    oh, i forgot to say that i'm programming in C#. Can you say me how the Code looks in C#

    Thanks

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