Hi ErnestoM
Thank You very much for the response.But let me explain my scenario in a better way .I have a tab control created with 7 tabs ..each tab as each view and the tabs are nothing but buttons.Basically when I open my form from the search button, I open the search tab or view and I want to hide all other tabs .And when I open the form from the New butoon I am opening the same view with all Tabs(All Views) visible.
As you said in both the scenario the fields are blank. what I did was created a input parameter in the form load:
try
{
if (e.InputParameters.Keys.Contains("sview"))
{
string s = e.InputParameters["sview"].ToString();
MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:SwitchViews", NamespaceManager).SetValue(s);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Then I have a SwitchViews boolean field created in the maindatasource which has false as default value.I have applied conditional formating on all the tabs/buttons..if switchviews = true then hide the tabs.And then trying to open the form with the parameter passed.I dont know if this is the right way to do it or am I missing something. Please advice.
Thank You!!!