cxgrid中第一列Properties设置为combobox,通过动态导入以后,我第二列的导入要通过第一列的选定的哪个字段做为条件,决定第二列的COMBOBOX中显示为何数据,就当于,没有用CXGRID时哪个COMBOBOX时,第一个是省,二个字是市,我市的数据要通过先选省,然后第二个COMBOBOX中才会有市一样!谢谢大家帮我一下谢谢!

解决方案 »

  1.   

    Cxgrid的第一列的ONCloseUp来动态导入第二个列下拉列表的数据
      

  2.   

    procedure TProductInform.cxGrid1DBTableView1Merchandise_namePropertiesChange(
      Sender: TObject);
    begin
      inherited;  aset1.CommandText:='select * from Merchandise_Info where merchandise_name='''+这里就是第一列的条件+'''';
        while not aset1.Eof do
        begin
         tcxcomboboxproperties(cxgrid1dbtableview1brand.Properties).Items.Add(trim(aset1.FieldValues['brand']));
         aset1.Next;
        end;end;