Extjs 树到网格节点拖动在Ext4.0但在Ext4.1中工作
我有一个树面板Extjs 树到网格节点拖动在Ext4.0但在Ext4.1中工作,extjs,drag,extjs4.1,gridpanel,treepanel,Extjs,Drag,Extjs4.1,Gridpanel,Treepanel,我有一个树面板 var t = new Ext.TreePanel({ . . store: <loaded dynamically> viewConfig: { allowCopy: true, copy: true, plugins:{ ptype: 'treeviewdragdrop', dragGroup: 'dragGroup',
var t = new Ext.TreePanel({
.
.
store: <loaded dynamically>
viewConfig: {
allowCopy: true,
copy: true,
plugins:{
ptype: 'treeviewdragdrop',
dragGroup: 'dragGroup',
dragText: 'Place the node to grid'
}
}
});
var t=new Ext.TreePanel({
.
.
商店:
视图配置:{
允许复制:是的,
抄袭:对,
插件:{
p类型:“treeviewdragdrop”,
dragGroup:“dragGroup”,
dragText:“将节点放置到网格”
}
}
});
和一个网格面板,如图所示
var bpMappingGrid = Ext.create('Ext.grid.Panel',{
.
.
.
.
columns:[
{
header:'Application Name',
dataIndex:'applicationName', //The same name should be there in treenode too
align:'center',
width:150
},{
header:'Tagged BusinessProcess',
dataIndex:'businessProcessName', //The same name should be there in treenode too
align:'center',
width:180
}
],
store: <loaded dynamically>,
viewConfig: {
plugins:{
ptype: 'gridviewdragdrop',
dropGroup: 'dragGroup'
}
}
});
var bpMappingGrid=Ext.create('Ext.grid.Panel'{
.
.
.
.
栏目:[
{
标题:'应用程序名称',
dataIndex:'applicationName',//树节点中也应该有相同的名称
对齐:'居中',
宽度:150
},{
标题:'Tagged BusinessProcess',
dataIndex:'businessProcessName',//在treenode中也应该有相同的名称
对齐:'居中',
宽度:180
}
],
商店:,
视图配置:{
插件:{
p类型:“gridviewdragdrop”,
dropGroup:“dragGroup”
}
}
});
每个节点都有一个关联的businessProcessName
和applicationName
。因此,当我们拖动一个节点时,它会将这些数据索引的相应值分配给网格
这段代码在ExtJS 4.0中运行良好,但在ExtJS 4.1的网格中插入一个空行。
请告诉我如何使其适用于ExtJS 4.1。确保树网格和常规网格都定义了包含以下字段的模型:businessProcessName和applicationName。确保树网格和常规网格都定义了包含以下字段的模型:businessProcessName和applicationName