UD Table and Dropdown Menu

plop this in initialize custom code or form load

resourceGroupComboC1.DropDownStyle = Infragistics.Win.UltraWinGrid.UltraComboStyle.DropDownList;

when you say it let you type something in before, did you mean in the combo, or do you have a textbox still visible?

In the combo. No text box visible. I will put it back in, close out Epicor, and try again.

Alright, The retriever is for Resource Groups. That way all they need to do is select the resource group instead of typing; trying to eliminate human errors. Anyway, I typed in Greener, which is not a resource group and it still allowed me to save Greener.

It shouldn’t let you type anything at all.
You might have to use an epicombo or epiultracombo

Can post the whole code block @Will79 ? I’m betting there is something you are missing that you don’t know you’re missing.

// **************************************************
// Custom code for UD24Form
// Created: 11/29/2022 7:03:57 PM
// **************************************************
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 **

	// End Wizard Added Module Level Variables **

	// Add Custom Module Level Variables Here **

	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
	}

	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
epiComboC1.DropDownStyle = Infragistics.Win.UltraWinGrid.UltraComboStyle.DropDownList;

resourceGroupComboC1.DropDownStyle = Infragistics.Win.UltraWinGrid.UltraComboStyle.DropDownList;

//bool whatamI = resourceGroupComboC1.DropDownStyle;


	}
}

You have your code in destroy custom code, it needs to be in initialize custom code.

And for christ sake! Please rename your custom controls…

lol, I think that’s his test one

umm…i feel a lot :sheep: :sheep: :sheep: :sheep:

1 Like

It is! I rename them when I go into production. If its something I haven’t’ done before I do it in test till I learn, then do it again into live and rename accordingly. the resistance and the duplicating of steps helps me learn a bit.

1 Like

ok, well as long as you don’t leave it that way.

Last question, and THANK YOU and @klincecum for assisting/teaching me along the way. I want to learn about the BAQCombo. I know it is in help but didn’t know if there is a better article I could review?

1 Like

There’s this post as well. You pretty much just drop in the combo box, and set the parameters like is show in this screen shot. There really isn’t much more to it.

1 Like

@Banderson @klincecum

Just thought of this, is it possible to take one of the key fields and turn it into an dropdown?

As long as it’s not key one I think you can. Just bind your drop down to one of the key fields instead of wherever else you had it bound to.

1 Like

Perfect! Curiously, when you setup the UD table in menu maint, it shows the key fields, but it doesn’t let you delete the text box. Is there a way around this besides hiding it?

image

Epicor has the following logic in place, that if you use CodeTypeID = 'something' in your SearchFilter, it will automatically make it a DropDownList.

Just for the record.

That is slick! One question, If I was to use this, where would I put in the info to populate the drop down?