关于DBGRIDEH 下拉框只读和显示的问题。(100)

D

drifer

Unregistered / Unconfirmed
GUEST, unregistred user!
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; 从网上搜索出来的,可以解决下拉框只读的问题,但我原来的数据历史在DBGRIDEH里,如果不是keylist里的数据的话那就不能显示出来,这该怎么办啊?
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
558
import
I
I
回复
0
查看
664
import
I
顶部