cxLookupComboBox

来源:互联网 发布:matlab 股票数据 编辑:程序博客网 时间:2024/06/10 12:37
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;
0 0