cxtreelist 的列不能切换是为什么呢
列的Editing, focusing全为True
切换行时,编辑的列是可以修改的,只是同一行,切换列,一点反应没有,这是为什么呢

解决方案 »

  1.   

    鼠标右键窗体
    View as Form
    贴出来。
      

  2.   

    object DeTree: TcxTreeList
              Left = 0
              Top = 0
              Width = 692
              Height = 319
              Align = alClient
              Bands = <
                item
                  Caption.Text = 'Band1'
                  Width = 977
                end>
              BufferedPaint = False
              DragMode = dmAutomatic
              LookAndFeel.NativeStyle = True
              OptionsBehavior.AlwaysShowEditor = True
              OptionsBehavior.CellHints = True
              OptionsBehavior.AutomateLeftMostIndent = False
              OptionsBehavior.Sorting = False
              OptionsBehavior.FocusCellOnCycle = True
              OptionsSelection.HideFocusRect = False
              OptionsSelection.MultiSelect = True
              OptionsView.CellAutoHeight = True
              OptionsView.GridLines = tlglBoth
              OptionsView.HeaderSingleLine = True
              OptionsView.Indicator = True
              PopupMenu = PopupMenu1
              TabOrder = 0
              OnCustomDrawCell = DeTreeCustomDrawCell
              OnDragDrop = DeTreeDragDrop
              OnDragOver = DeTreeDragOver
              OnEdited = DeTreeEdited
              OnEditing = DeTreeEditing
              OnExit = DeTreeExit
              OnFocusedColumnChanged = DeTreeFocusedColumnChanged
              OnFocusedNodeChanged = DeTreeFocusedNodeChanged
              OnKeyPress = DeTreeKeyPress
              object tlcDeBh: TcxTreeListColumn
                PropertiesClassName = 'TcxTextEditProperties'
                Properties.OnValidate = tlcDeBhPropertiesValidate
                Caption.AlignHorz = taCenter
                Caption.AlignVert = vaCenter
                Caption.Text = '编号'
                DataBinding.ValueType = 'String'
                Width = 87
                Position.ColIndex = 0
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDeMc: TcxTreeListColumn
                Caption.AlignHorz = taCenter
                Caption.AlignVert = vaCenter
                Caption.Text = '名称'
                DataBinding.ValueType = 'String'
                Width = 174
                Position.ColIndex = 1
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDeDw: TcxTreeListColumn
                Caption.AlignHorz = taCenter
                Caption.AlignVert = vaCenter
                Caption.Text = '单位'
                DataBinding.ValueType = 'String'
                Width = 49
                Position.ColIndex = 2
                Position.RowIndex = 0
                Position.BandIndex = 0
                OnGetEditProperties = tlcDeDwGetEditProperties
              end
              object tlckey: TcxTreeListColumn
                Visible = False
                DataBinding.ValueType = 'String'
                Width = 93
                Position.ColIndex = 14
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDeScj: TcxTreeListColumn
                PropertiesClassName = 'TcxCurrencyEditProperties'
                Properties.Alignment.Horz = taRightJustify
                Properties.DisplayFormat = ',0.0000;-,0.0000'
                Properties.ValidateOnEnter = True
                Caption.AlignHorz = taCenter
                Caption.AlignVert = vaCenter
                Caption.Text = '市场价'
                DataBinding.ValueType = 'Float'
                Width = 75
                Position.ColIndex = 3
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDeCbdj: TcxTreeListColumn
                PropertiesClassName = 'TcxCurrencyEditProperties'
                Properties.ValidateOnEnter = True
                Caption.AlignHorz = taCenter
                Caption.AlignVert = vaCenter
                Caption.Text = '成本价'
                DataBinding.ValueType = 'String'
                Width = 73
                Position.ColIndex = 4
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDeRgdj: TcxTreeListColumn
                PropertiesClassName = 'TcxCurrencyEditProperties'
                Properties.ValidateOnEnter = True
                Caption.AlignHorz = taCenter
                Caption.AlignVert = vaCenter
                Caption.Text = '人工单价'
                DataBinding.ValueType = 'String'
                Width = 71
                Position.ColIndex = 5
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDeCldj: TcxTreeListColumn
                PropertiesClassName = 'TcxCurrencyEditProperties'
                Properties.Alignment.Horz = taRightJustify
                Properties.DisplayFormat = ',0.00;-,0.00'
                Properties.ValidateOnEnter = True
                Caption.AlignHorz = taCenter
                Caption.AlignVert = vaCenter
                Caption.Text = '材料单价'
                DataBinding.ValueType = 'String'
                Width = 59
                Position.ColIndex = 6
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDeSbdj: TcxTreeListColumn
                PropertiesClassName = 'TcxCurrencyEditProperties'
                Properties.ValidateOnEnter = True
                Caption.AlignHorz = taCenter
                Caption.AlignVert = vaCenter
                Caption.Text = '设备单价'
                DataBinding.ValueType = 'String'
                Width = 71
                Position.ColIndex = 8
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDeZcdj: TcxTreeListColumn
                PropertiesClassName = 'TcxCurrencyEditProperties'
                Properties.ValidateOnEnter = True
                Caption.AlignHorz = taCenter
                Caption.AlignVert = vaCenter
                Caption.Text = '主材单价'
                DataBinding.ValueType = 'String'
                Width = 71
                Position.ColIndex = 7
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDeJxdj: TcxTreeListColumn
                PropertiesClassName = 'TcxCurrencyEditProperties'
                Properties.ValidateOnEnter = True
                Caption.AlignHorz = taCenter
                Caption.AlignVert = vaCenter
                Caption.Text = '机械单价'
                DataBinding.ValueType = 'String'
                Width = 71
                Position.ColIndex = 9
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDeQtdj: TcxTreeListColumn
                PropertiesClassName = 'TcxCurrencyEditProperties'
                Properties.ValidateOnEnter = True
                Caption.AlignHorz = taCenter
                Caption.AlignVert = vaCenter
                Caption.Text = '其他费'
                DataBinding.ValueType = 'String'
                Width = 72
                Position.ColIndex = 10
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDeGysm: TcxTreeListColumn
                PropertiesClassName = 'TcxBlobEditProperties'
                Properties.AlwaysSaveData = False
                Properties.BlobEditKind = bekMemo
                Properties.BlobPaintStyle = bpsText
                Properties.MemoScrollBars = ssBoth
                Properties.PictureGraphicClassName = 'TMetafile'
                Properties.PopupWidth = 413
                Properties.ShowExPopupItems = False
                Properties.ShowPicturePopup = False
                Caption.AlignHorz = taCenter
                Caption.AlignVert = vaCenter
                Caption.Text = '工艺说明'
                DataBinding.ValueType = 'String'
                Width = 294
                Position.ColIndex = 11
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDeSid: TcxTreeListColumn
                Visible = False
                Caption.AlignHorz = taCenter
                Caption.AlignVert = vaCenter
                Caption.Text = '含量'
                DataBinding.ValueType = 'String'
                Position.ColIndex = 31
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDePid: TcxTreeListColumn
                Visible = False
                DataBinding.ValueType = 'String'
                Position.ColIndex = 31
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDeLb: TcxTreeListColumn
                Visible = False
                Caption.Text = '节点类别'
                DataBinding.ValueType = 'String'
                Position.ColIndex = 31
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDeIsNew: TcxTreeListColumn
                Visible = False
                Caption.Text = '是否新建的节点'
                DataBinding.ValueType = 'String'
                Position.ColIndex = 31
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDeLrl: TcxTreeListColumn
                Tag = 1
                PropertiesClassName = 'TcxCurrencyEditProperties'
                Properties.ValidateOnEnter = True
                Caption.AlignHorz = taCenter
                Caption.AlignVert = vaCenter
                Caption.Text = '利润率(%)'
                DataBinding.ValueType = 'String'
                Width = 72
                Position.ColIndex = 12
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
              object tlcDeLr: TcxTreeListColumn
                PropertiesClassName = 'TcxCurrencyEditProperties'
                Properties.ValidateOnEnter = True
                Caption.AlignHorz = taCenter
                Caption.AlignVert = vaCenter
                Caption.Text = '利润'
                DataBinding.ValueType = 'String'
                Width = 70
                Position.ColIndex = 13
                Position.RowIndex = 0
                Position.BandIndex = 0
              end
            end
          end
        end
      end
      

  3.   

      OnEdited = DeTreeEdited
      OnEditing = DeTreeEditing
      OnFocusedColumnChanged = DeTreeFocusedColumnChanged
    这几个事件中,应该有什么代码影响了。
    比方说,被 cancel 了 或者 Handled 被设置成 true了。
    单单是 cxTreeList的话,没有理由不能编辑的。或许我分析的不对,你可以这样检验。
    代码复制一份备份。
    然后,把cxTreeList 一个个事件中的代码清掉再运行一下。除了 单位 那一栏不敢肯定外,其他的肯定是可以编辑的。
      

  4.   

    我怀疑楼主 Tree关系 也就是数据绑定 有错了!