Hi,
We use Epicor 9.05 with OpenEdge.
I want to add a custom code to a dashboard to allow a checkbox to be cheched in when we open the dashboard. When I test the code all is ok but when I deploy, I got the error:
Error:CS0103 The name ‘chkDateTrue’ does not exist in the current context
I e-10, you would have to make an event with the wizard for form load, you can’t just put in in initialize custom code. I’m not sure if it’s the same I e9 or not, but give that a try.
Deploy the dashboard without the customization in the dashboard program itself. Once you deploy the dashboard and add it to a menu as a dashboard assembly, logoff/logon, open your dashboard in customization mode and do your customization on top of the dashboard and set the customization to load for that dashboard via menu maintenance. This will give you the load event and all other event types and is a much better way to customize a dashboard. My experience has been trying to do customizations with code in the dashboard program is a headache.
You might have to get control of the checkbox with a GUID and your own name.
This an example with a lot of code you won’t need, but if you look at the the part with the code below, that’s how you can get control of that check box.
Does E9 have cache issues like early E10 did?? In E10 I would have problems with the system holding on to old customizations and had to delete them manually from my computer.
I try with the properties visible = false and the object disappear. So the cod work fine, it’s the properties “Checked” who don’t does what I expected.
I’ll try to find the correct properties
Here’s an out of the box possible solution. Can you change the values (using a calculated field or something) that would be defaulted to what you want with false? So flip the current logic around. The check box comes in unchecked by default right? That would give you the behavior that you want without needing the customization.
Typically Dashboards are a little different, some of the Panes tend to start to build themselves during _Load. Usually a good area to put any logic in is PaneActivated however you could try Form Shown which is after the _Load
Example:
// InitializeCustom Code
this.MainController.Shown += MainController_Shown;
// DestroyCustom Code
this.MainController.Shown -= MainController_Shown;
private void MainController_Shown(object sender, EventArgs e)
{
// Do work Here
}
If that doesn’t work then you will end up with PaneDisplayed Event which is a little more complicated to setup. That event will trigger whenever the Pane is Activated so even when you do navigate to a different Tab and come back, so you will need extra logic to not re-initialize the default over and over again, some if/else.
In a Nutshell if I recall and it might be diff in E9.
// Global Var
private Infragistics.Win.UltraWinDock.UltraDockManager udm;
// InitializeCustom Code
// TODO: Change this.**OverviewTab** with your Tab Name
udm = ((Infragistics.Win.UltraWinDock.DockablePaneBase)(((Infragistics.Win.UltraWinDock.DockableControlPane)((Infragistics.Win.UltraWinDock.DockableWindow)(this.OverviewTab.Parent)).Pane))).Manager;
udm.PaneDisplayed += new Infragistics.Win.UltraWinDock.PaneDisplayedEventHandler(this.ultraDockManager1_PaneActivate);
// DestroyCustom Code
udm.PaneDisplayed -= new Infragistics.Win.UltraWinDock.PaneDisplayedEventHandler(this.ultraDockManager1_PaneActivate);
private void ultraDockManager1_PaneActivate(object sender, Infragistics.Win.UltraWinDock.PaneDisplayedEventArgs e)
{
// This event provides a notification when the active pane
// (see the ActivePane property of the UltraDockManager)
// has been changed. a pane may be activated programatically
// by calling the pane's activate method or by giving focus
// to a control contained within the dockable control pane.
MessageBox.Show( "Pane! " + e.Pane.Key);
switch (e.Pane.Key)
{
case "YourTabID":
// Do Work
break;
}
}
Thank you guys for your help but I’m little overwhelm. I’m new on EP 9 and it’s to mutch for me for now. I’ll try to figure out next week after a relaxing week end
Your checkbox is probably binded to a view. Set your value from the view. If it’s a Tracker View, make sure “Input prompts Only” is checked in your Tracker section.