Hide Dashboard Tabs

Sorry Shannon, I attempted to re-create the issue but that seems to work perfectly on my attempts. I was wondering if it was a personalization issue, but that didn’t stop it either.

Hi Shannon, did you find any solution to this problem? I am also having the same problem. Please post the solution if you found any. Thank you

No, I never did find a solution to this.

I’m up against the same thing right now. I want to conditionally show a tab base on some loaded record information, and I can hide the panel inside the tab very easily, but it does not remove the tab. Visible = false in the tab property in customization mode behaves differently from Visible = false in runtime code. Annoying to say the least, but I’m sure we’ll figure it out and will post back here when we do. It might not be pretty.

1 Like

Force a refresh\redraw with reflection maybe? For sure I look forward to your solution.

Use Angular y’all.

Got it. There may be a shortcut way to get to where I am but this works and I don’t feel like taking the time to refactor anymore than this lol

// Get the main dock panel which will contain the base dock manager we need
MainDockPanel mainPanel =(MainDockPanel)csm.GetNativeControlReference("D1E2D613-8F6D-4014-AD5C-F68870E1EC69");
// Get the reference to our dockable pane we want. In my dashboard it didn't have a Key so I did the lookup on TextTab instead :S
var plcTab = mainPanel.baseDockManager.ControlPanes.Cast<Infragistics.Win.UltraWinDock.DockableControlPane>().Where(x => x.TextTab == "PLC Information").FirstOrDefault();
// Show the tab standard DockableControlPane stuff
plcTab.Show();
// Hide the tab standard DockableControlPane stuff
plcTab.Close();
1 Like

Ok, I lied I made it a little bit cleaner but I still don’t like it

Method to implement, need to swap out object type for you dock area manager which is usually the main panel in any screen

private void ShowHideDockablePane(string iTextTab, bool iVisible)
	{
		YOUR.MAIN.PANEL.TYPE mainDockPanel = (YOUR.MAIN.PANEL.TYPE)csm.GetNativeControlReference("YOUR-MAIN-PANEL-GUID");
		var tab = mainDockPanel.baseDockManager.ControlPanes.Cast<Infragistics.Win.UltraWinDock.DockableControlPane>().Where(x => x.TextTab == iTextTab).FirstOrDefault();
		if(iVisible)
		{
			tab.Show();
		}
		else
		{
			tab.Close();
		}
	}

Usage is pretty self explanatory

ShowHideDockablePane("PLC Information", true); // shows the tab
ShowHideDockablePane("PLC Information", false); // hides the tab

The way epicor does it in the background is goofy. They perma hide it when you select visible false in the properties window using a Hashtable they load at runtime specifically designed to hide sheets.

4 Likes

Thank you for the code example. Worked perfectly. I know this post may be old, but for others who follow, you will need to add a

using System.Linq; 

statement for the tab variable declaration to work.

1 Like