cxtreelist的一列properties设为checkbox,可修改,我想实现当这一行记录达到某个条件时,checkbox的值不允许改变,请问如何实现?

解决方案 »

  1.   

    procedure TfrmMain.cxTreeList1Column1GetEditingProperties(
      Sender: TcxTreeListColumn; ANode: TcxTreeListNode;
      var EditProperties: TcxCustomEditProperties);
    beginend;procedure TfrmMain.cxTreeList1Column1GetEditProperties(
      Sender: TcxTreeListColumn; ANode: TcxTreeListNode;
      var EditProperties: TcxCustomEditProperties);
    beginend;应该是这两个中的一个。
    在界面上影藏放两个 cxCheckBox ,一个选中,一个不选中。
    参数中的 EditProperties ,按你的条件,返回其中之一 的 Propertieslz自己试试看,很久不研究了,也不敢保证了。
      

  2.   

    谢谢 之前用cxTreeList1Column1GetEditProperties试了下,在添加第一级节点的时候有触发该事件,而且触发不止一次,添加子节点的时候却没有触发,很是疑惑
      

  3.   

    谢谢 iamduo之前用cxTreeList1Column1GetEditProperties试过,在添加第一级节点的时候会连续触发两次,在添加其子节点的时候就没有触发该事件,不知何故