# Set dashboard tab text by code

**URL:** <https://www.epiusers.help/t/set-dashboard-tab-text-by-code/75492>\
**Category:** Epicor ERP 10\
**Tags:** dashboard, customization, epicor\
**Created:** [February 11, 2021, 2:40pm UTC](https://www.epiusers.help/t/set-dashboard-tab-text-by-code/75492 "2021-02-11T14:40:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adrian\_Mepham](https://www.epiusers.help/user_avatar/www.epiusers.help/adrian_mepham/32/6960_2.png) [@Adrian\_Mepham](https://www.epiusers.help/u/Adrian_Mepham)\
**Post date:** [February 11, 2021, 2:40pm UTC](https://www.epiusers.help/t/set-dashboard-tab-text-by-code/75492/1 "2021-02-11T14:40:24Z")

</div>

I have a dashboard with five tabs, all using a filter on a grid view for working weekdays. The first contains the results for up to and including today, tab 2 for today +1, tab 3 for today + 2. What I would like to know is, is it possible to customise the text on the tabs to show the actual date each time the dashboard is used?

---

<div class="post-metadata">

**Author:** ![cfinley](https://www.epiusers.help/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cfinley](https://www.epiusers.help/u/cfinley)\
**Post date:** [February 24, 2021, 9:37pm UTC](https://www.epiusers.help/t/set-dashboard-tab-text-by-code/75492/2 "2021-02-24T21:37:03Z")

</div>

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:

```csharp
//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](https://www.epiusers.help/uploads/default/original/3X/1/b/1b2f4a8ecf575fe6f02b0328ec35b2c0180c7de5.png)

This helped me figure this out

> [@Hide Dashboard Tabs](https://www.epiusers.help/t/hide-dashboard-tabs/47972/27):
>
> 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…

---

<div class="post-metadata">

**Author:** ![Adrian\_Mepham](https://www.epiusers.help/user_avatar/www.epiusers.help/adrian_mepham/32/6960_2.png) [@Adrian\_Mepham](https://www.epiusers.help/u/Adrian_Mepham)\
**Post date:** [February 25, 2021, 9:24pm UTC](https://www.epiusers.help/t/set-dashboard-tab-text-by-code/75492/3 "2021-02-25T21:24:20Z")

</div>

Thank you @cfinley, that’s just what I was looking for. I will give it a try and see how I get on.  
Thanks again

---

<div class="post-metadata">

**Author:** ![Adrian\_Mepham](https://www.epiusers.help/user_avatar/www.epiusers.help/adrian_mepham/32/6960_2.png) [@Adrian\_Mepham](https://www.epiusers.help/u/Adrian_Mepham)\
**Post date:** [March 5, 2021, 12:38pm UTC](https://www.epiusers.help/t/set-dashboard-tab-text-by-code/75492/4 "2021-03-05T12:38:38Z")

</div>

I am getting an error with this line

```cs
using Ice.UI.App.(Due-Shipments);

```

Identifier Expected.  
Is my syntax correct?
