Hi All,
I am using Infopath form in my application and I am using the CheckBox control. I have defined certain Rules under this control and also had a Change event for this. Now I need to save the form once I check on (true) the checkbox.
I have tried using some lines of code to achieve this, but was unsuccessful.
public void Validate_Changed(object sender, XmlEventArgs e)
{
XPathNavigator secDSNav = MainDataSource.CreateNavigator();
//Retrieve the rows of the secondary data source
XPathNodeIterator rows = secDSNav.Select(@"/my:myFields/my:DesigneeTable/my:DesigneeRow", NamespaceManager);
bool IsChecked = rows.Current.SelectSingleNode(@"/my:myFields/my:DesigneeTable/my:DesigneeRow/my:qESxtp/my:Validate", NamespaceManager).ValueAsBoolean;
if (IsChecked)
{
this.Save();
}
}
This throws the below error:
The method or operation is not implemented.
System.NotImplementedException: The method or operation is not
implemented.
at
Microsoft.Office.InfoPath.Server.SolutionLifetime.XmlFormProxy.Save()
at
Microsoft.Office.InfoPath.XmlFormHostItem.Save()
at
DORLogTemplate.FormCode.Validate_Changed(Object sender, XmlEventArgs e)
at
Microsoft.Office.InfoPath.Server.SolutionLifetime.XmlEventExternal.<>c__DisplayClass10.<>c__DisplayClass14.<add_Changed>b__d()
at
Microsoft.Office.InfoPath.Server.Util.DocumentReliability.InvokeBusinessLogic(Thunk
thunk)
at
Microsoft.Office.InfoPath.Server.SolutionLifetime.XmlEventExternal.<>c__DisplayClass10.<add_Changed>b__c(Object
sender, XmlEventArgs e)
at
Microsoft.Office.InfoPath.Server.SolutionLifetime.XmlEventExternal.<>c__DisplayClass20.<FireChangedEvent>b__1c()
at
Microsoft.Office.InfoPath.Server.DocumentLifetime.OMExceptionManager.CallFormCodeWithExceptionHandling(UserMessages
userMessages, OMCall d)
Could anyone please help me out of this problem.
Thanks,
Siraj.