cxGrid行中某字段设置为combobox的时候如何通过代码设置items中的项目呢?(100分)

  • 主题发起人 egetrich
  • 开始时间
E

egetrich

Unregistered / Unconfirmed
GUEST, unregistred user!
cxGrid行中某字段设置为combobox的时候如何通过代码设置items中的项目呢?
 
with qrydo
begin
close;
sql.text:='select * from aaa';
try
open;
while not eofdo
begin
s:=FieldbyName('fff').asString;
if TcxComboBoxProperties(clnsType.Properties).Items.IndexOf(s)<0 then
//避免添加重复数据
TcxComboBoxProperties(columnName1.Properties).Items.Add(s);
next;//columnName1---combobox所在的那一列的列名
end;
except
end;
end;
//别忘了给分!
 

Similar threads

回复
0
查看
650
不得闲
S
回复
0
查看
1K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
926
SUNSTONE的Delphi笔记
S
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
顶部