0
A
回答
1
我解決了擴展DropZone的問題。這個實現作爲構造函數參數接收目標網格,並且這個參數位於源網格的rbar(停靠控制)中。關鍵是將ddGroup設置爲「header-dd-zone-」加上源網格中的id。我希望這是有用的。
Ext.define('Crud.FilterDropZone', {
extend: 'Ext.dd.DropZone'
, constructor: function() {}
, init: function (grid) {
var me = this;
if (grid.rendered) {
me.grid = grid;
me.ddGroup = 'header-dd-zone-' + grid.up('grid').id;
grid.getView().on({
render: function(v) {
me.view = v;
Crud.FilterDropZone.superclass.constructor.call(me, me.view.el);
},
single: true
});
} else {
grid.on('render', me.init, me, {single: true});
}
}
, getTargetFromEvent: function (e) {
return {};
}
, onNodeDrop: function (nodeData, source, e, data) {
var header = data.header
, store = Ext.getCmp(e.target.id).getStore();
//store.add(new store.RecordType({ property: header.text, value: '', reference: header.dataIndex}));
store.add([[header.text, '', header.dataIndex]]);
}
});
相關問題
- 1. 拖動和電網和EXTJS
- 2. Extjs網格標題繪製在其他控件的頂部
- 3. 獲取ExtJS網格中的列標題
- 4. ExtJS的電網
- 5. ExtJS的電網
- 6. ExtJS 3.2:網格列標題分組
- 7. 隱藏ExtJS網格列標題
- 8. 我想根據其在ExtJS的電網
- 9. ExtJS的拖動與滾動
- 10. EXTJS 3.3.3電網
- 11. ExtJS 6 - 自動調整網格列標題文本
- 12. 自動更新對網頁上其他標題的引用
- 13. ExtJS的自動滾屏的電力網
- 14. extjs 4網格樹拖拽
- 15. jquery ui對話框可由除標題欄以外的其他元素拖動
- 16. Extjs 4拖放網格到區域取消拖動項目
- 17. 嵌套電網EXTJS
- 18. 如何將TextView拖動到正確的目標其他TextView
- 19. ExtJS的3.4:在電網
- 20. 兩個電網的ExtJS 4
- 21. 爲了在ExtJS的電網
- 22. Wpf拇指拖動不發射拖動輸入其他組件
- 23. 拖動DataGrid行到其他DataGrid行
- 24. Actionscript3克隆和拖動對象其他
- 25. 沒有下降其他拖動
- 26. 獲取放置在網格列標題中的字段。 Extjs 6
- 27. 如何在extjs的網格列標題中添加過濾器?
- 28. 拖動和觸摸其他div元素
- 29. 鼠標拖動問題
- 30. ExtJS - EditorGridPanel行不可拖動?
你的問題不太清楚。顯示你的嘗試。 –
我需要在另一個網格中創建一個DropZone,它從第一個網格接收列標題的拖動,保留最後一個網格的默認重排序列功能。 我正在擴展DropZone,並認爲我在正確的方式。 – hesenger