view plaincopy to clipboardprint? with DataModule2.AqryWorkShop do begin Close; sql.clear; sql.Add('select * from workshop'); Open; First; DBGridEh2.Columns[7].PickList.clear; while not eof do begin DBGridEh2.Columns[7].PickList.Add(fieldbyname('shop').AsString); //多出如下这句操作 DBGridEh2.Columns[7].KeyList.Add(fieldbyname('shop').AsString); next; end; end; DBGridEh2.Columns[7].ReadOnly := true;
|