Set dashboard tab text by code

Well if it would need to persist, you would have to create a UD field in a UD table or something. But as for setting the tab text, use:

//Add these to your using statements
using Ice.UI.App.(name of your dashboard goes here);
using System.Linq;


public void InitializeCustomCode()
	{
		// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
		// Begin Wizard Added Variable Initialization

		// End Wizard Added Variable Initialization

		// Begin Wizard Added Custom Method Calls

		// End Wizard Added Custom Method Calls
		MainDockPanel mainPanel = (MainDockPanel)csm.GetNativeControlReference("D1E2D613-8F6D-4014-AD5C-F68870E1EC69");

		var firstTab = mainPanel.baseDockManager.ControlPanes.Cast<Infragistics.Win.UltraWinDock.DockableControlPane>().Where(x => x.TextTab == "test").FirstOrDefault();
		
		firstTab.TextTab = DateTime.Today.ToString();

	}

image

This helped me figure this out

1 Like