2

是否可以将用户定义字段 (UDF) 移动到某个位置的主窗体/窗口?如果是,有人可以提供一个例子吗?例如,我不知道如何从 UDF 窗口获取字段或如何获取 UDF 窗口的引用。

4

1 回答 1

1

我没有找到移动 UDF 字段的方法,但我找到了克隆它的方法:

Form myForm = ...;//get Form

myForm.Freeze(true);//freeze form for the flickering problem

Item itemTmp = myForm.Items.Add("NewItemId", BoFormItemTypes.it_COMBO_BOX);

ComboBox comboItem = itemTmp.Specific;
comboItem.ExpandType = BoExpandType.et_DescriptionOnly;
itemTmp.DisplayDesc = true;//display the description of the selected value
comboItem.DataBind.SetBound(true, "OITM", "U_HGR_id");//OITM is the DB table for Items/Articles. U_HGR_id is the UDF field (also column name) that I want to clone to the main window

loadUdfValuesInCombo(comboItem);//a local function that loads the values in the newly created combobox

myForm.Freeze(false);//unfreeze form
于 2015-07-13T09:28:59.977 回答