var 
treeList : tcxTreeList;
CheckBox: TcxCheckBox; 
if (treeList.FocusedColumn.TreeList.InplaceEditor.ClassName = 'TcxCheckBox') then
        begin
          CheckBox := TcxCheckBox(treeList.FocusedNode.TreeList.InplaceEditor);
          CheckBox.Checked := not CheckBox.Checked;
        end为什么CheckBox.Checked := not CheckBox.Checked;不能改变CheckBox的选中呢!!是不是有什么属性设置了?

解决方案 »

  1.   

    直接改Node.Values[Column.Position.ColIndex]好了。
    Value的类型取决于你设的相应列的Properties.ValueChecked.Type, ValueUnchecked.Type
    比如说,把ValueChecked设成true,Type设成boolean,ValueUnchecked设成false,type一样。
    然后直接改Node.Values[Column.Position.ColIndex] := not Node.Values[Column.Position.ColIndex];
      

  2.   

    对了,Node := cxTreeList.FocusedNode;
      

  3.   

    谢谢,可以了!! 还想问一个这样选着了,不会触发TcxCheckBox的点击事件呢!