Hide Dashboard Tabs

I have four tabs in my dashboard that I need to hide. I have selected them and make them invisible but it keeps the tab there.


I have also opened the XML and they are marked as hide.
I’m not great with script but if someone can point me in the right direction I can try that. I have also added this line of code but get an error:
Ice.UI.App.GS_Cust_Serv_Dash.V_GS_envision_1ViewDockPanel6 V_GS_envision_1ViewDockPanel6 = ((Ice.UI.App.GS_Cust_Serv_Dash.V_GS_envision_1ViewDockPanel6).csm.GetNativeControlReference(“5f12913d-34ea-4b15-b607-5fdd29280f8b”));
V_GS_envision_1ViewDockPanel6.Visible = false;

The error is Error: CS0119 - line 55 (3348) - ‘Ice.UI.App.GS_Cust_Serv_Dash.V_GS_envision_1ViewDockPanel6’ is a ‘type’, which is not valid in the given context.

Try changing Enabled to false.

I tried that and saved the customization. I closed out and reopened it and it is still there. In fact it changed it back to Enabled. :frowning:

Try to Enabled to false on form load then.

Okay, I am very limited on Script Experience.
Do I go to Customization, Wizards, Form Event Wizard, Select Load and put in code?
Now for the best part what is the code I put in? Sorry ahead of time - my coding skills are limited.

I tried this and I keep getting errors:
Ice.UI.App.GS_Cust_Serv_Dash.V_GS_envision_1ViewDockPanel6 = false;

You may need to declare a variable to access the panel.

declare a variable global :
private EpiBasePanel NameOfPanel;

then in initialyse code add:
NameOfPanel = (EpiBasePanel) csm.GetNativeControlReference(" the EpiGuiD value of your panel you need to access ");

and in the load event of the form try:
NameOfPanel.Visible = false;

Pierre

I tried this and it didn’t hide the panel. Do I put this section after the //Begin Wizard Added Module Level Variables**? my code compiled properly but it didn’t work.

then in initialyse code add:
NameOfPanel = (EpiBasePanel) csm.GetNativeControlReference(" the EpiGuiD value of your panel you need to access ");

You need to share your customization code so that we can fix, otherwise it’s taking shots in the dark

// **************************************************
// Custom code for MainController
// Created: 9/15/2018 11:34:11 AM
// **************************************************
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Ice.BO;
using Ice.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;

public class Script
{
// ** Wizard Insert Location - Do Not Remove ‘Begin/End Wizard Added Module Level Variables’ Comments! **
// Begin Wizard Added Module Level Variables **
private EpiBasePanel V_GS_envision_1ViewDockPanel6;
private EpiDataView edvV_GS_Order_Notes_1View;
// End Wizard Added Module Level Variables **

// Add Custom Module Level Variables Here **

private string custid;
private int ordernum;
private int qty;
private int quoteqty;
private int numcolors;
private string quotepartnum;
private string partnum;
private int quotenum;
private int newquoteqty;
private string newquotepartnum;
private int newnumcolors;
private int newqtybreaks;
private string newcustid;
private int neworderqty;
private string neworderpartnum;
private int ordernumcolors;
private int neworderqtybreaks;
private string ordercustid;

public void InitializeCustomCode()

{
	// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
	// Begin Wizard Added Variable Initialization
    V_GS_envision_1ViewDockPanel6 = (EpiBasePanel)csm.GetNativeControlReference("5f12913d-34ea-4b15-b607-5fdd29280f8b");
	this.V_GS_Order_Detail_All_1View_Row.EpiRowChanged += new EpiRowChanged(this.V_GS_Order_Detail_All_1View_AfterRowChange);
	this.V_GS_Quote_All_1View_Row.EpiRowChanged += new EpiRowChanged(this.V_GS_Quote_All_1View_AfterRowChange);
	
	this.edvV_GS_Order_Notes_1View = ((EpiDataView)(this.oTrans.EpiDataViews["V_GS_Order_Notes_1View"]));
	
	// End Wizard Added Variable Initialization

	// Begin Wizard Added Custom Method Calls
	this.epiButtonC1.Click += new System.EventHandler(this.epiButtonC1_Click);
	this.epiButtonC2.Click += new System.EventHandler(this.epiButtonC2_Click);
	this.epiButtonC4.Click += new System.EventHandler(this.epiButtonC4_Click);
	this.btnOrderNote.Click += new System.EventHandler(this.btnOrderNote_Click);
	// End Wizard Added Custom Method Calls
}

public void DestroyCustomCode()
{
	// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
	// Begin Wizard Added Object Disposal

	this.V_GS_Order_Detail_All_1View_Row.EpiRowChanged -= new EpiRowChanged(this.V_GS_Order_Detail_All_1View_AfterRowChange);
	this.epiButtonC1.Click -= new System.EventHandler(this.epiButtonC1_Click);
	this.V_GS_Quote_All_1View_Row.EpiRowChanged -= new EpiRowChanged(this.V_GS_Quote_All_1View_AfterRowChange);
	this.epiButtonC2.Click -= new System.EventHandler(this.epiButtonC2_Click);
	this.epiButtonC4.Click -= new System.EventHandler(this.epiButtonC4_Click);

	this.btnOrderNote.Click -= new System.EventHandler(this.btnOrderNote_Click);
	// End Wizard Added Object Disposal

	// Begin Custom Code Disposal

	// End Custom Code Disposal
}

private void V_GS_Order_Detail_All_1View_AfterRowChange(EpiRowChangedArgs args)
{
	// ** Argument Properties and Uses **
	// args.CurrentView.dataView[args.CurrentRow]["FieldName"]
	// args.LastRow, args.CurrentRow, args.CurrentView
	// Add Event Handler Code
//MessageBox.Show(ordernum.ToString() + "OrderDetailAllViewRowChange, " + ", " + qty.ToString() + ", " + numcolors.ToString());
custid = string.Empty;
ordernum = Convert.ToInt32(args.CurrentView.dataView[args.CurrentRow]["OrderDtl_OrderNum"].ToString());
custid = args.CurrentView.dataView[args.CurrentRow]["Customer_CustID"].ToString();
qty = Convert.ToInt32(Convert.ToDecimal(args.CurrentView.dataView[args.CurrentRow]["OrderDtl_OrderQty"].ToString()));
numcolors = Convert.ToInt32(args.CurrentView.dataView[args.CurrentRow]["OrderDtl_GS_NbrOfColors_c"].ToString());
partnum = args.CurrentView.dataView[args.CurrentRow]["OrderDtl_PartNum"].ToString();
epiTextBoxC1OrderItem.Text = args.CurrentView.dataView[args.CurrentRow]["OrderDtl_PartNum"].ToString();
epiNumericEditorC1OrderQty.Value = Convert.ToInt32(Convert.ToDecimal(args.CurrentView.dataView[args.CurrentRow]["OrderDtl_OrderQty"].ToString()));
epiNumericEditorC1OrderNumColors.Value = Convert.ToInt32(args.CurrentView.dataView[args.CurrentRow]["OrderDtl_GS_NbrOfColors_c"].ToString());
epiTextBoxC1OrderID.Text = args.CurrentView.dataView[args.CurrentRow]["Customer_CustID"].ToString();
DynamicQueryAdapter dqa = new DynamicQueryAdapter(oTrans);
dqa.BOConnect();
QueryExecutionDataSet qeds = dqa.GetQueryExecutionParametersByID("GS_Order_Notes_Test");
qeds.ExecutionParameter.Clear();
qeds.ExecutionParameter.AddExecutionParameterRow("OrderNum", ordernum.ToString() , "nvarchar",false, Guid.NewGuid(), "A");
dqa.ExecuteByID("GS_Order_Notes_Test",qeds);
epiUltraGridC2.DataSource = dqa.QueryResults.Tables["Results"];
}

private void epiButtonC1_Click(object sender, System.EventArgs args)
{
//pass list of parameters - Quote From Order
// these items cannot be null or empty //!
LaunchFormOptions lfo = new LaunchFormOptions();
System.Collections.Generic.Dictionary<string, string> mylist = new System.Collections.Generic.Dictionary<string, string>();
mylist.Add("entitynum", "0"); //this should be "0" if getting new quote or new sales order
neworderpartnum = epiTextBoxC1OrderItem.Text;
mylist.Add("partnum", neworderpartnum.ToString()); 
neworderqty = Convert.ToInt32(epiNumericEditorC1OrderQty.Text);
mylist.Add("quantity", neworderqty.ToString()); 
ordercustid = epiTextBoxC1OrderID.Text;
mylist.Add("custid", ordercustid); 
neworderqtybreaks = Convert.ToInt32(epiNumericEditorC2OrderQtyBreak.Text);
mylist.Add("quantitybreaks", neworderqtybreaks.ToString());
ordernumcolors = Convert.ToInt32(epiNumericEditorC1OrderNumColors.Text);
mylist.Add("numofcolors", ordernumcolors.ToString()); //!
mylist.Add("prevorder", ordernum.ToString());
mylist.Add("actiontype", "NewQuote"); //!
string valuein = "Quote";
lfo.ValueIn = valuein;
lfo.ContextValue = mylist;
ProcessCaller.LaunchForm(oTrans, "jesCustF", lfo); //parameters (EpiTransaction, MenuName of DLL to call, LaunchFormOptions)
}

private void V_GS_Quote_All_1View_AfterRowChange(EpiRowChangedArgs args)
{
	// ** Argument Properties and Uses **
	// args.CurrentView.dataView[args.CurrentRow]["FieldName"]
	// args.LastRow, args.CurrentRow, args.CurrentView
	// Add Event Handler Code
//MessageBox.Show("Start " + custid + ", " + quotenum.ToString() + ", " + quoteqty.ToString() + ", " + numcolors.ToString() + ", " + quotepartnum.ToString());
custid = quotepartnum = newquotepartnum = string.Empty;
quotenum = Convert.ToInt32(args.CurrentView.dataView[args.CurrentRow]["QuoteDtl_QuoteNum"].ToString());
custid = args.CurrentView.dataView[args.CurrentRow]["Customer_CustID"].ToString();
quoteqty = Convert.ToInt32(Convert.ToDecimal(args.CurrentView.dataView[args.CurrentRow]["QuoteDtl_SellingExpectedQty"].ToString()));
numcolors = Convert.ToInt32(args.CurrentView.dataView[args.CurrentRow]["QuoteDtl_GS_NbrOfColors_c"].ToString());
quotepartnum = args.CurrentView.dataView[args.CurrentRow]["QuoteDtl_PartNum"].ToString();
epiTextBoxC11Item.Text = args.CurrentView.dataView[args.CurrentRow]["QuoteDtl_PartNum"].ToString();
epiNumericEditorC1QQty.Value = Convert.ToInt32(Convert.ToDecimal(args.CurrentView.dataView[args.CurrentRow]["QuoteDtl_SellingExpectedQty"].ToString()));
epiTextBoxC8Cust.Text = args.CurrentView.dataView[args.CurrentRow]["Customer_CustID"].ToString();
epiNumericEditorC2NumColors.Value = Convert.ToInt32(args.CurrentView.dataView[args.CurrentRow]["QuoteDtl_GS_NbrOfColors_c"].ToString());
}

private void epiButtonC2_Click(object sender, System.EventArgs args)
{
//pass in single value(entitynum - Quote Number) Edit Quote
// these items cannot be null or empty //!
LaunchFormOptions lfo = new LaunchFormOptions();
string valuein = “Quote”;
string contextvaluein = quotenum.ToString();// this will be the sales quote number //!
lfo.ValueIn = valuein;
lfo.ContextValue = contextvaluein;
ProcessCaller.LaunchForm(oTrans, “jesCustF”, lfo); //parameters (EpiTransaction, MenuName of DLL to call, LaunchFormOptions)
}

private void epiButtonC4_Click(object sender, System.EventArgs args)
{
//pass list of parameters - New Quote with Customer and Part
// these items cannot be null or empty //!
LaunchFormOptions lfo = new LaunchFormOptions();
System.Collections.Generic.Dictionary<string, string> mylist = new System.Collections.Generic.Dictionary<string, string>();
mylist.Add(“entitynum”, “0”); //this should be “0” if getting new quote or new sales order
newquotepartnum = epiTextBoxC11Item.Text;
mylist.Add(“partnum”, newquotepartnum);
newquoteqty = Convert.ToInt32(epiNumericEditorC1QQty.Text);
mylist.Add(“quantity”, newquoteqty.ToString()); //!
newcustid = epiTextBoxC8Cust.Text;
mylist.Add(“custid”, newcustid); //!
newqtybreaks = Convert.ToInt32(epiNumericEditorC3QQtyBreaks.Text);
mylist.Add(“quantitybreaks”, newqtybreaks.ToString());
newnumcolors = Convert.ToInt32(epiNumericEditorC2NumColors.Text);
mylist.Add(“numofcolors”, newnumcolors.ToString()); //!
mylist.Add(“actiontype”, “NewQuote”); //!
string valuein = “Quote”;
lfo.ValueIn = valuein;
lfo.ContextValue = mylist;
ProcessCaller.LaunchForm(oTrans, “jesCustF”, lfo); //parameters (EpiTransaction, MenuName of DLL to call, LaunchFormOptions)
}

private void MainController_Load(object sender, EventArgs args)
{
	V_GS_envision_1ViewDockPanel6.Visible = false;
}

private void btnOrderNote_Click(object sender, System.EventArgs args)
{

DynamicQueryAdapter dqa = new DynamicQueryAdapter(oTrans);
dqa.BOConnect();
QueryExecutionDataSet qeds = dqa.GetQueryExecutionParametersByID("GS_Order_Notes");
qeds.ExecutionParameter.Clear();
qeds.ExecutionParameter.AddExecutionParameterRow("OrderNum", ordernum.ToString() , "nvarchar",false, Guid.NewGuid(), "A");
dqa.ExecuteByID("GS_Order_Notes_Test",qeds);
epiUltraGridC1OrderNotes.DataSource = dqa.QueryResults.Tables["Results"];
}

}

try changing your Load method from

private void MainController_Load(object sender, EventArgs args)
{
	V_GS_envision_1ViewDockPanel6.Visible = false;
}

to

private void MainController_Load(object sender, EventArgs args)
{
	Ice.UI.App.V_GS_envision_1ViewDockPanel6 panel = (Ice.UI.App.V_GS_envision_1ViewDockPanel6)csm.GetNativeControlReference("yourControlGuidHere");
	panel.Visible = false;
}

and make sure it compiles before saving/exiting

Okay so the code Aaron_Moreng gave me worked. However, It is only hiding the grid on the tab and not the actual tab itself. I need to hide the entire docked sheet so there won’t be any tab showing on this.

// **************************************************
// Custom code for MainController
// Created: 9/15/2018 11:34:11 AM
// **************************************************
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Ice.BO;
using Ice.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;

public class Script
{
// ** Wizard Insert Location - Do Not Remove ‘Begin/End Wizard Added Module Level Variables’ Comments! **
// Begin Wizard Added Module Level Variables **

private EpiBasePanel V_GS_UD09_Movement_1ViewDockPanel9;

// End Wizard Added Module Level Variables **
// Add Custom Module Level Variables Here **

private string custid;
private int ordernum;
private int qty;
private int quoteqty;
private int numcolors;
private string quotepartnum;
private string partnum;
private int quotenum;
private int newquoteqty;
private string newquotepartnum;
private int newnumcolors;
private int newqtybreaks;
private string newcustid;
private int neworderqty;
private string neworderpartnum;
private int ordernumcolors;
private int neworderqtybreaks;
private string ordercustid;

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

	V_GS_UD09_Movement_1ViewDockPanel9 = (EpiBasePanel)csm.GetNativeControlReference("06c39f71-f266-4ccb-a3a5-996beedb575c");
	
	// End Wizard Added Variable Initialization

	// Begin Wizard Added Custom Method Calls
	
	// End Wizard Added Custom Method Calls
}

public void DestroyCustomCode()
{
	// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
	// Begin Wizard Added Object Disposal

	// End Wizard Added Object Disposal

	// Begin Custom Code Disposal

	// End Custom Code Disposal


private void MainController_Load(object sender, EventArgs args)
{

	V_GS_UD09_Movement_1ViewDockPanel9 = (EpiBasePanel)csm.GetNativeControlReference("06c39f71-f266-4ccb-a3a5-996beedb575c");
	V_GS_UD09_Movement_1ViewDockPanel9.Visible = false;
}

}

Just replace the panel control with the appropriate control, which I wouldn’t know. It should still work

Question… why not use the dashboard editor and simply delete the tabs?

I need the baq to be in there so I can add it to a grid.

Anybody else have any ideas. Here is where I am so far:

	private void MainController_Load(object sender, EventArgs args)
	{
	V_GS_Quotes_1ViewDockPanel1 = (EpiBasePanel)csm.GetNativeControlReference("9e4e5839-71dc-4376-a14e-832da79fd24b");	
	V_GS_Quotes_1ViewDockPanel1.Visible = false;
	}

And that doesn’t work?

No, it does change the property to Visible = False but the tab is still showing.

Make sure the GetNativeControlReference GUID is the correct one. it sounds like your GUID is pointing to the grid instead of the tab.

Everything is correct.
I did change it to this and still getting the same thing. Nothing is showing on the Tab but the tab is still there.
Ice.UI.App.GS_Cust_Serv_Dash.V_GS_Quotes_1ViewDockPanel1 V_GS_Quotes_1ViewDockPanel1 = (Ice.UI.App.GS_Cust_Serv_Dash.V_GS_Quotes_1ViewDockPanel1)csm.GetNativeControlReference("9e4e5839-71dc-4376-a14e-832da79fd24b"); V_GS_Quotes_1ViewDockPanel1.Visible = false;

It’s doing the same thing with other tabs…