Asked by:
Change TAB INDEX of a mdiParent

Question
-
I Have a Parent Mdi Forms, from which i am calling my mdichild which has 2 tabs in it.
now what i want to do is, when i click on a button on mdi parent, which is supposed to open the mdi child form with the other tab in it... But the mdi child form is opening with 1st tab
hope u all understand what im saying???
this is giving trouble..
please if anyone having any suggestions then share!!!Should I be more clear?
private void enrollStudentToolStripMenuItem_Click(object sender, EventArgs e)
{
FormstudMaster frm = new FormstudMaster();
foreach (Form form in Application.OpenForms)
{
if (form.GetType() == typeof(FormstudMaster)) // if any form present then activate it!
{
form.Activate();
return;
}
}
if (ActiveMdiChild == null || ActiveMdiChild.Name != "FormstudMaster") // If form not present //then create new form...
{
frm.MdiParent = this;
frm.Show();////Activate this form with the second tab present in the form??????
}
else { frm.BringToFront(); }
}
- Edited by osmniv Saturday, October 18, 2014 6:19 AM
Friday, October 17, 2014 11:06 AM
All replies
-
You can write a script to hide the other tab onclick of the button on parent
Regards, Saad
Friday, October 17, 2014 11:08 AM -
I am not getting any options for even selecting which tab to show and which not.
FormstudMaster frm = new FormstudMaster();
if (ActiveMdiChild == null || ActiveMdiChild.Name != "FormstudMaster")
{
frm.MdiParent = this;
frm.Show();
frm.SetTab(2); //// I want to do some thing like this
}
- Edited by osmniv Friday, October 17, 2014 11:21 AM
Friday, October 17, 2014 11:20 AM -
set the focus on the tab which you want to using this post.
To show a tab:
Xrm.Page.ui.tabs.get("yourtabname").setVisible(true);
To hide a tab:
Xrm.Page.ui.tabs.get("yourtabname").setVisible(false);Regards, Saad
Friday, October 17, 2014 11:32 AM -
Not Working mate....
- Edited by osmniv Saturday, October 18, 2014 6:15 AM
Saturday, October 18, 2014 6:14 AM -
your CRM version??
Regards, Saad
Monday, October 20, 2014 5:11 AM