-
The only click events in InfoPath are on buttons, not other controls. If you really want to populate the dropdown based on a click, place a button next to it that is hidden or disabled once the dropdown is populated. You haven't made it clear, though, why you want to have this behavior instead of populating it in advance.
-
You should use a default value on the field bound to the dropdown box, or a rule to set the value of the field bound to the dropdown box. However, the rule to do this cannot be on that field itself because rules on fields only execute when their field's value changes.
-
Please see the attached template.
-
Please read it more carefully.
-
Please have a look at this link:
http://www.infopathdev.com/forums/p/15236/54008.aspx#54008
-
Can you post the full error here?
-
The code you posted there should work fine in domain level trust. Is there some other code in your form that might be causing the error?
-
That's strange then. Can you describe the type of data loss you're experiencing?
-
Are you trying to use this with image files? I believe that images are not stored with the InfoPath header information as other file types are, and will cause erratic behavior in the above code.
-
It sounds like you changed the data source when you added the new section. Instead of that, you should bind the section control to a node already in the data source (you can bind it to the same node as the radio button).