在JS中我使用以下代码,会增加一个节点但没有信息
var _pNode = ct_obs.getNodeById(parentnodeid);
var _newNode = new Ext.tree.TreeNode({
    id: newnodeid,
    uiProviders: 'col',
    obs_code: Ext.getCmp("obscode").getValue(),
    obs_name: Ext.getCmp("obsname").getValue()
  });
 //_newNode.customAttributes.Add(new Ext.tree.ConfigItem("obs_code","nodeText",  ParameterMode.Value, false)); 
  _pNode.appendChild(_newNode);

解决方案 »

  1.   

    使用以下方法可以解决:
    var newNode = new Ext.tree.AsyncTreeNode({
    uiProvider: Ext.tree.ColumnNodeUI  //此句不能省略
    });

    newNode.attributes.leaf = true;
            //以下为自定义属性
    newNode.attributes.task = 'ssss';
    newNode.attributes.duration = '15';
    newNode.attributes.user = '15ssssss';_pNode.appendChild(_newNode);
      

  2.   

    增加可以,要修改时如何修改呢 ,
    var _pNode = ct_eps.getNodeById(parentnodeid);
                                                                    _pNode.attributes.eps_code = Ext.getCmp("txtepscode").getValue();
    _pNode.attributes.eps_name = Ext.getCmp("txtepsname").getValue();
    这样就行不行啊 
    _pNode.setText(Ext.getCmp("txtepscode").getValue());
    用只能修改第一列