之前发过贴提过了,但没有想要的答案~
再发一贴~
我要的效果是,cxGrid已经填充数据了,
比如在GRID里有A、B、C、D列,D列属性是combobox,
当我点击D列的combobox时,跟据A、B、C的内容而动态添加combobox的内容。
找了很久没找到相关的资料。。
希望大家能帮下忙 。。谢谢。
再发一贴~
我要的效果是,cxGrid已经填充数据了,
比如在GRID里有A、B、C、D列,D列属性是combobox,
当我点击D列的combobox时,跟据A、B、C的内容而动态添加combobox的内容。
找了很久没找到相关的资料。。
希望大家能帮下忙 。。谢谢。
Sender: TcxTreeListColumn; ANode: TcxTreeListNode;
var EditProperties: TcxCustomEditProperties);
begin
TcxTreeListColumn(sender).PropertiesClass :=
TcxComboBoxProperties;
end;//动态改变下拉列表
TcxComboBoxProperties(cxTreeList1cxTreeListColumn5.Properties).Items.Assign(CmbInmStatus.Items)我用的cxtreelist,
cxgrid是类似的
TcxComboBoxProperties(cxTreeList1cxTreeListColumn5.Properties).Items.Assign(CmbInmStatus.Items)
procedure TForm1.cxGrid1DBTableView1CanSelectRecord(
Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord;
var AAllow: Boolean);
begin
TcxComboBoxProperties(cxGrid1DBTableView1Column3.Properties).Items.Clear;
TcxComboBoxProperties(cxGrid1DBTableView1Column3.Properties).Items.Add('TT');
end;
{OR}
procedure TForm1.cxGrid1DBTableView1CanFocusRecord(
Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord;
var AAllow: Boolean);
begin
TcxComboBoxProperties(cxGrid1DBTableView1Column3.Properties).Items.Clear;
TcxComboBoxProperties(cxGrid1DBTableView1Column3.Properties).Items.Add('TT');
end;