in Education by
How can I use Ext.tree.ViewDDPlugin's events? I have a TreePanel that uses DDPplugin, but I'd like to know how to listen to the drop event. This is what my code looks like: var monPretree = Ext.create('Ext.tree.Panel',{ id : 'treepanel', title : 'TITRE', //width : 800, //height : 600, width : 500, enableDD: true, useArrows : true, viewConfig : { plugins : { ptype: 'treeviewdragdrop', appendOnly: true, listeners: { drop: function (node, data, overModel, dropPosition) { alert('CHANGE'); }, notifyDrop: function (dragSource, event, data) { var nodeId = data.node.id; alert(nodeId); }, notifyOver: function (dragSource, event, data) { alert('over'); } } } }, singleExpand : false, store : monPrestore, rootVisible : false, I would like to fire drop events for example, but my code doesn't work Thanks :) JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I've got same question and found this page. There is note in documentation, in event section: "This event is fired through the TreeView. Add listeners to the TreeView object" I've tryed to found method in tree.Panel class to get view, unsuccessfully. So, all you need to do, just put listners block in configuration to viewConfig section (not in plugin section): viewConfig : { plugins : { ptype: 'treeviewdragdrop', ... }, listeners: { drop: function (node, data, overModel, dropPosition) { alert('CHANGE'); }, } } }, http://docs.sencha.com/ext-js/4-0/#!/api/Ext.tree.plugin.TreeViewDragDrop-event-drop

Related questions

0 votes
    To open the table, on the icon that has the required table name in Tables Pane of Database Window (A) Drag ... click (D) Triple Click Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
0 votes
    I'm maintaining a Windows app that has multiple forms in the one window (form1, form2, form3). I' ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    Which of the following are the drag and drop events? (a) drop (b) dragstart (c) both drop and ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    When the end event fires on EOF when no more data will arrive, which function is called? (a) s ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    Please refer to my test case https://jsfiddle.net/1c3Lmace/13/ This is my code $(document).ready( ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    c. To copy a formula in Microsoft Excel, you select the cell and drag this symbol that appears on the lower ... 7 computer please help Select the correct answer from above options...
asked Dec 28, 2021 in Education by JackTerrance
0 votes
    Did Wipro fires and asks for 1.35 lakh INR to innocent girl engineer fresher of 2022 | Wipro Mass LayOffs for freshers | 2022-2023?...
asked Jan 4, 2023 in Technology by Editorial Staff
0 votes
    Find the odd man out: 1. Photosynthesis, Respiration, Decomposition, Forest Fires. 2. Combustion, ... Science proposed by,electromagnetic theory engineering physics,Science nptel...
asked Nov 7, 2021 in Education by JackTerrance
0 votes
    To copy a formula in Microsoft Excel, you select the cell and drag this ___ write one word Select the correct answer from above options...
asked Dec 27, 2021 in Education by JackTerrance
0 votes
    To copy a formula in Microsoft Excel, you select the cell and drag this ___ write one word Select the correct answer from above options...
asked Dec 26, 2021 in Education by JackTerrance
0 votes
    Which of the following attribute specifies whether or not a user is allowed to drag an element? A - drag B - content C - context D - draggable...
asked Dec 3, 2020 in Technology by JackTerrance
0 votes
    Suppose you drop a tie at random on the rectangular region shown in fig. below. What is the probability that it ... with diameter 1 m? Select the correct answer from above options...
asked Nov 25, 2021 in Education by JackTerrance
0 votes
    Suppose you drop a die at random on the rectangular region as shown in the following figure. What is the ... point of view) Select the correct answer from above options...
asked Nov 25, 2021 in Education by JackTerrance
0 votes
    Suppose you drop a die at random on the rectangular region shown in figure. What is the probability that it will ... diameter 1 m? Select the correct answer from above options...
asked Nov 17, 2021 in Education by JackTerrance
...