F
Fred
I don't understand how to load a view by using the from openning
rules. But the rule itself is not dynamically enough. The best options
is that I can control using code in the form load events. So I write
the following code to handle the form load event, like the following.
XPathNavigator nav = this.MainDataSource.CreateNavigator();
string viewName = nav.SelectSingleNode("/my:myFields/my:View",
NamespaceManager).Value;
MessageBox.Show("entering switchview");
if (!string.IsNullOrEmpty(viewName))
{
this.ViewInfos.SwitchView(viewName);
this.ViewInfos.Initial = this.ViewInfos[viewName];
}
This section of code works if they handle a button click event, but it
does not work in Form load event, and there is no exception displayed?
Does anyone have this kind experience before?
thanks
rules. But the rule itself is not dynamically enough. The best options
is that I can control using code in the form load events. So I write
the following code to handle the form load event, like the following.
XPathNavigator nav = this.MainDataSource.CreateNavigator();
string viewName = nav.SelectSingleNode("/my:myFields/my:View",
NamespaceManager).Value;
MessageBox.Show("entering switchview");
if (!string.IsNullOrEmpty(viewName))
{
this.ViewInfos.SwitchView(viewName);
this.ViewInfos.Initial = this.ViewInfos[viewName];
}
This section of code works if they handle a button click event, but it
does not work in Form load event, and there is no exception displayed?
Does anyone have this kind experience before?
thanks