ExtJs TreeGrid with editor column. Exists?

你离开我真会死。 提交于 2019-12-04 19:18:34

问题


I need an ability to edit values in a grid column of a treegrid. Simply adding a editor to the column's config didn't helped. I'm using ExtJs4 treepanel component.

Any ideas?


回答1:


Yup, it exists.

I would recommend using the latest version, which at this time is 4.1 Release Candidate 1.

Use an Ext.Tree.Panel

add a Grid Editing plugin, like this:

  plugins:[
    Ext.create('Ext.grid.plugin.CellEditing', {
      clicksToEdit:2
    })
  ]

make at least one of the columns editable like this

editor:{
  xtype:'textfield'
}

You are basically combining this:

http://docs.sencha.com/ext-js/4-0/#!/example/tree/treegrid.html

and this:

http://docs.sencha.com/ext-js/4-0/#!/example/grid/cell-editing.html




回答2:


found the solution:

http://www.sencha.com/forum/showthread.php?131602-4.0.0-Cellediting-on-TreeGrid http://www.sencha.com/forum/showthread.php?143983-Problems-Trying-To-Edit-Tree-Panel-ExtJS-4



来源:https://stackoverflow.com/questions/9312165/extjs-treegrid-with-editor-column-exists

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!