之前发过贴提过了,但没有想要的答案~
再发一贴~
我要的效果是,cxGrid已经填充数据了,
比如在GRID里有A、B、C、D列,D列属性是combobox,
当我点击D列的combobox时,跟据A、B、C的内容而动态添加combobox的内容。
找了很久没找到相关的资料。。
希望大家能帮下忙 。。谢谢。

解决方案 »

  1.   

    这个应该不难吧,lz已经说得很明白了,只要点击Combobox下拉列表这个事件的时候进行判断那就可以了。
      

  2.   

    问题是找不到哪个事件可以判断点了Combobox下拉列表
      

  3.   

    在Event的Properties有对应事件的。
      

  4.   

    procedure Tform1.cxTreeList1cxTreeListColumn5GetEditingProperties(
      Sender: TcxTreeListColumn; ANode: TcxTreeListNode;
      var EditProperties: TcxCustomEditProperties);
    begin
      TcxTreeListColumn(sender).PropertiesClass :=
        TcxComboBoxProperties;
    end;//动态改变下拉列表
    TcxComboBoxProperties(cxTreeList1cxTreeListColumn5.Properties).Items.Assign(CmbInmStatus.Items)我用的cxtreelist,
    cxgrid是类似的
      

  5.   

    我现在就是不知道这条语句该放在哪一个事件里..
    TcxComboBoxProperties(cxTreeList1cxTreeListColumn5.Properties).Items.Assign(CmbInmStatus.Items) 
      

  6.   


    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;