I have a dropdownlist in a configurator populated by a BAQ. When the BAQ has only 1 row, how do i set the list to item be default so the user does not have to select it?
Did you see this thread Joe?
I did not. That looks like what i am looking for. Thanks!
Thanks for the link. That answered my question. I took it a little further and created a UDMethod called “On Page Loaded” that goes through all drop downs and sets them to the single item if only one item is found.
/* Cycle through all inputs on page 1 where the debug control is found */
foreach(Control ctrl in Inputs.cbDebug.Control.Parent.Controls) {
if (ctrl is Ice.Lib.Framework.EpiUltraCombo) {
var tb = (InputControlValueBound<Ice.Lib.Framework.EpiUltraCombo,String>)Inputs[ctrl.Name.ToString()].Value;
if (tb.Control.Rows.Count == 1)
{
((InputControlValueBound<Ice.Lib.Framework.EpiUltraCombo,String>)Inputs[ctrl.Name.ToString()].Value).Value = tb.Control.Rows[0].Cells[0].Text;
}
2 Likes