1
2
3
4
|
cxLookupComboBox1
.
Properties
.
ListSource
//数据源
cxLookupComboBox1
.
Properties
.
ListFieldNames
//数据源中某字段名称
cxLookupComboBox1
.
Properties
.
KeyFieldNames
//数据源中某字段名称对应的ID号
cxLookupComboBox1
.
EditValue
//读出当前选的内容的ID号
//-----------------自定义过滤
incrementalfiltering,=false//,设置成false,不过虑就行,要选择不了.
procedure TForm1.cxLookupComboBox1PropertiesChange(Sender: TObject);
begin if trim(cxLookupComboBox1.EditText)='' then exit; //输入空,退出更新列表 if cxLookupComboBox1.Properties.ListField.AsString=cxLookupComboBox1.EditText then exit; //输入和选择列表相同,退出更新列表 ADOTable1.Filtered:=false; ADOTable1.Filter:='name like ''%'+cxLookupComboBox1.EditText+'%'''; ADOTable1.Filtered:=True; |
cxLookupComboBox
最新推荐文章于 2023-01-19 12:59:08 发布