J
Jithendrian. R
I need to use the infopath form in my windows application. So by using
FormControl i am loading the infopath form. The thing is, the view inside
the infopath form has to be loaded based on the person using the application.
If the user is admin then his corresponding view has to be loaded. So i
implemented Microsoft.Office.InfoPath.IInitEventHandler event and set the
window instance as the Initialize event handler in the form Load event. the
followinfg is the code
public void InitEventHandler(object sender,
Microsoft.Office.InfoPath.XmlForm xmlForm, out
Microsoft.Office.Interop.InfoPath.XdReadOnlyViewMode viewsReadOnlyMode)
{
viewName =
System.Configuration.ConfigurationManager.AppSettings["AdminView"];
xmlForm.ViewInfos.Initial = xmlForm.ViewInfos[viewName];
viewsReadOnlyMode =
Microsoft.Office.Interop.InfoPath.XdReadOnlyViewMode.xdDefault;
}
But then when i run my application the initial view is set to the required
view but what is getting displayed is the default view. The initail view is
nt dispalyed
Need help reagrding this
TIA
Cheers
Jithendrian. R
FormControl i am loading the infopath form. The thing is, the view inside
the infopath form has to be loaded based on the person using the application.
If the user is admin then his corresponding view has to be loaded. So i
implemented Microsoft.Office.InfoPath.IInitEventHandler event and set the
window instance as the Initialize event handler in the form Load event. the
followinfg is the code
public void InitEventHandler(object sender,
Microsoft.Office.InfoPath.XmlForm xmlForm, out
Microsoft.Office.Interop.InfoPath.XdReadOnlyViewMode viewsReadOnlyMode)
{
viewName =
System.Configuration.ConfigurationManager.AppSettings["AdminView"];
xmlForm.ViewInfos.Initial = xmlForm.ViewInfos[viewName];
viewsReadOnlyMode =
Microsoft.Office.Interop.InfoPath.XdReadOnlyViewMode.xdDefault;
}
But then when i run my application the initial view is set to the required
view but what is getting displayed is the default view. The initail view is
nt dispalyed
Need help reagrding this
TIA
Cheers
Jithendrian. R