Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7084013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:14:57+00:00 2026-05-28T07:14:57+00:00

I’m facing a problem using ExtJS4. My application has a tree containing a string

  • 0

I’m facing a problem using ExtJS4.

My application has a tree containing a string representing an employee.
Inside this tree, drag&drop works just fine.
Now I’m trying to have a panel, to which an employee can be dragged to delete.

So I let ExtJS create a new Ext.dd.DDTarget, define the dragzone as needed (and this is the part that works, because it’s recognized as a valid goal for dropping) … but when I drop the employee, nothing happens. I just can’t figure out which listener to use and where exactly to use it …

And I don’t really know, which part of my code I should post with this question to support you in supporting me (:D) … so I just post what I think I should post and edit this post if something is missing … 🙂

So here is my DDTarget:

 var trashDDTarget = Ext.create('Ext.dd.DDTarget', 'trashTarget', 'trashDrag');

where ‘trashTarget’ is the panel (so below) and ‘trashDrag’ the name of the dragGroup…

The targetPanel:

  var trashPanel = Ext.create('Ext.panel.Panel', {
title: 'Trash!',
id: 'trashTarget',
width: 400,
height: 150,
renderTo: 'trash',
bodyStyle: 'background-image: url(/images/trash_can.png) !important'
});

And this is one of my ideas to solve this problem:

  Ext.override(Ext.dd.DDTarget, {
onDragDrop  : function(evtObj, targetElId) {
  console.log(evtObj);
},
onInvalidDrop: function(evt) {
  console.log(evt);
}
});

Overriding some listeners; but it doesn’t work.
I hope I didn’t confuse you and that maybe someone can help me … 🙂

Thanks in advance
gilaras

—————————-
UPDATE:

I changed the panel to a gridpanel …
When I drag an item onto it, it disappears from the tree …
… but it doesn’t seem to fire any event specified in the docs …
My new panel looks like this:

 var trashPanel = Ext.create('Ext.grid.Panel', {
title: 'Trash!',
id: 'trashTarget',
width: 400,
viewConfig: {
  plugins: {
    ptype: 'gridviewdragdrop',
    dropGroup: 'trashDrag',
    dragGroup: 'trashDrag',
    dragText: 'In den Papierkorb ziehen, um zu löschen...'
  }
},
height: 150,
renderTo: 'trash',
columns:[
  {
    hidden: true
  }
],

bodyStyle: 'background-image: url(/images/trash_can.png) !important'
});

But somehow this doesn’t work either …

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:14:57+00:00Added an answer on May 28, 2026 at 7:14 am

    Hm okay, i guess I’ve found a solution 😉
    May not be the best, but it’s enough for what I need 😀
    I’ll post my solution here, so that maybe someday someone seeking for help on this topic may find it 🙂

    My problem (and the point that was wrong in my thoughts about it) was, that I didn’t know where to catch the events … or at least now it works, when catching it in the viewConfig of the gridpanel 🙂

    So here’s my new panel:

    var trashPanel = Ext.create('Ext.grid.Panel', {
    title: 'Trash!',
    id: 'trashTarget',
    width: 400,
    viewConfig: {
      plugins: {
        ptype: 'gridviewdragdrop',
        dropGroup: 'trashDrag',
        dragGroup: 'trashDrag',
        dragText: 'In den Papierkorb ziehen, um zu löschen...'
      },
      listeners: {
        drop: function(node, data, overModel, dropPosition) {
          console.log('Mitarbeiter mit ID ' + data.records[0].internalId + ' gedropt!');
          var antwort = function(btn){
            if(btn.indexOf('no') != -1){
              treeStore.load();
            } else {
              Ext.Ajax.request({
                  url: '/app/loeschenPage',
                  params:
                  {
                    id: data.records[0].internalId
                  },
                  method: 'GET',
                  success: function() {
                    Ext.MessageBox.alert("Und tschüss...", "Mitarbeiter erfolgreich aus der Datenbank gelöscht.");
                    treeStore.load();
                  }
                });
            }
          };
          Ext.MessageBox.confirm('Wirklich löschen?', 'Soll der Mitarbeiter WIRKLICH FUER IMMER geloescht werden? Das ist eine sehr lange Zeit...', antwort);
    
        }
      }
    },
    height: 150,
    renderTo: 'trash',
    columns:[
      {
        hidden: true
      }
    ],
    
    bodyStyle: 'background-image: url(/images/trash_can.png) !important'
    });
    

    Thanks anyways, writing my problem down really helped me thinking about it in a different way 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
Basically, what I'm trying to create is a page of div tags, each has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.