访问 cxGrid 列的 Properties 属性进行强制类型转换
在 cxGrid 中,根据列的 Properties 属性的不同设置,各个列的编辑类型是不同的,为了访问不同类型列的专有属性,需要对列的编辑类型进行转换。假定 cxGrid 中的一个列名称为 cvDanwei,其类型为 ComboBox,可用以下代码访问其专有属性:
with (cvDanwei.Properties as TcxComboBoxProperties) do begin
Items.Clear;
for i := 0 to Length(DanweiList) - 1 do
Items.Append(DanweiList[i]);
end;

浙公网安备 33010602011771号