本帖最后由 baidu_20650485 于 2014-11-11 15:20:26 编辑

解决方案 »

  1.   

    //加个TcxEditRepository控件, 双击打开控件后加个buttonEdit和label
    //使用下边的示例代码即可
    procedure TForm2.cxGrid1DBTableView1Column1GetProperties(Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
      var AProperties: TcxCustomEditProperties);
    begin
      if 显示按钮 then
        AProperties := cxEditRepository1ButtonItem1.Properties
      else
        AProperties := cxEditRepository1Label1.Properties;
    end;
      

  2.   

    我写的判断<显示按钮>的条件都是运行的时候出现的是else里的语句实现
    能不能麻烦大神教下判断语句哪里怎么写?
      

  3.   


    这个是你的提问,我想在cxgrid中 加入 button  ,propriety属性中只能设置为buttonedit,总是有个edit,如何设置,才可以向你的那样,只显示一个按钮呢?求教啊。谢谢。