怎么取出cxLookupComboBox多列的值
展开全部
在数据表中加了一个主键
Delphi/Pascal code?
procedure TForm1.Button1Click(Sender: TObject);
begin
adoQuery1.Filter:='ID='+IntToStr(cxLookupComboBox1.EditValue);
adoQuery1.Filtered:=True;
Edit1.Text:=adoQuery1.FieldByName('B').AsString;
Edit2.Text:=adoQuery1.FieldByName('C').AsString;
adoQuery1.Filtered:=False;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
with adoquery1 do
begin
close;
sql.Clear;
sql.Text:='select * from test';
open;
end;
end;
Delphi/Pascal code?
procedure TForm1.Button1Click(Sender: TObject);
begin
adoQuery1.Filter:='ID='+IntToStr(cxLookupComboBox1.EditValue);
adoQuery1.Filtered:=True;
Edit1.Text:=adoQuery1.FieldByName('B').AsString;
Edit2.Text:=adoQuery1.FieldByName('C').AsString;
adoQuery1.Filtered:=False;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
with adoquery1 do
begin
close;
sql.Clear;
sql.Text:='select * from test';
open;
end;
end;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询