-
I tried it but I get this Error massege:
System.Runtime.InteropServices.COMException
Invalid context for OM call.
What is the problem? Can I close a form in OnAfterChange event?
-
Do you have an OnSwitchView event handler defined? It sounds like you've got some code which is taking a while to complete. The dialog box you are seeing is normal for code that takes longer than a certain amount of time (I'm not sure what that length is).
Greg Collins [InfoPath MVP]
-
You would use:
thisXDocument.View.Window.Close(true);
Boolean Parameter:
true = don't show a dialog box asking if the user wants to close.
false = show the dialog box.
Greg Collins [InfoPath MVP]
-
Let's assume you have a repeating section/table displaying a list of colors, each with a check box next to them.
You can write some code in the OnAfterChange event for the check box that goes through the list of colors, see which ones are selected and create a concatenated string of them, separated by commas. Then you take that concatenated ...
-
Awesome!
Greg Collins [InfoPath MVP]
-
why is it that everytime i start a new technology i try to do something ,i think , basic, and i end up finding the limitations right away :-(
Can someone tell me if there is a way to Create list of hard-coded item i.e
red
black
yellow
and have the user elected one or more of the items(colors) and have it written back to my xml doc in the form ...
-
I have an InfoPath form (.NET infoPath project) that contain a field that contain OnAfterChange(DataDOMEvent e) event.
I this function I have a Confirm massege (In C#):
if (this.thisXDocument.UI.Confirm(''bla bla'', XdConfirmButtons.xdOKCancel) == XdConfirmChoice.xdCancel )
I want that click on Cancel will close the form!!!!
How to to it??
-
When i am trying to navigate between views am getting the Error dialog with following message
The script running in this form is causing infopath to run slowly. If the script continues to run, your computer may become unresponsive. Do you want to stop the script?
Application used Repeated sections and arrays? are they making the difference. ...
-
Thank you Greg. It's work!
-
Glad to hear you got it working!!
Greg Collins [InfoPath MVP]