Question about Drag and Drop using DataGrid controls

I use two DataGrids, each has a different type of object so that you can imagine when you drag - move into the other it causes an error in the cause the objects are not the same.
I already managed to do this work, on the dragDrop event, I stop the default behavior of the event by the preventDefault () method, this way I can convert manually one object in another and then add it to the target of DataGrid.
The problem is that because I stopped the default behavior of the event that remains the target DataGrid highlighted all the time (focus is on that point), so I have to do after my manual conversion object is to restore the DataGrid control to its normal state, which is what would have made the event's default behavior.

So any ideas how to do that? restore the DataGrid control in its normal state? or perhaps restore an event so that it can continue its default behavior?

OK I have found, after calling the preventDefault method and make my own logic, you call the method of the DataGrid hideDropFeedback () and that will do the job

Tags: Flex

Similar Questions

  • Other questions about drag-and - drop and depth

    Okay, team

    so I know my drag and drop code is probably 'stick' on the mouse event because there is something in front of the object...

    I'm trying to implement the numChildren code in order to bring the object moved forward...

    SO I add this code inside each movable answer...

    addEventListener (MouseEvent.MOUSE_DOWN, changedepth);

    function changedepth(event:MouseEvent):void {}

    this.parent.setchildIndex (this, this.parent.numChildren - 1).

    }

    OK so that part is ok, but my project is quite complex, so now when it goes on the next section or there are children who are have not themselves resets...

    So now I want to put something like that

    addEventListener (MouseEvent.MOUSE_UP, removechild);

    function removechild (event. MouseEvent) {}

    this.parent.removeChild(-1);

    }

    but of course this does not... any ideas?

    Cheers for your help

    Void

    You must assign the MOUSE_UP listener on the stage to make him independent object.  If you need to know which object has been moved then store a reference to it in a variable.

    In addition, the removeChild() method argument should be a DisplayObject, not a number

  • Drag and Drop with DataGrid to Image

    Hi all

    I have experimented with drag and drop between DataGrids. It was pretty simple, but what I want is to take a line from a DataGrid and drop it on an Image. Can I use or overlap the DataGrid drag and drop with a manual drag and drop for the Image? Or should I manually add the drag and drop only?

    I guess I'm just trying getting the Image to accept the line of the data grid.

    Hello

    Yes, you can interwine the two. I did something similar, except in my case I
    working with a datagrid and a tree and I need to override the default behavior for the tree.

    Just use dragEnabled = "true" to the datagrid control.

    Then the Image to define functions for the dragEnter and dragDrop events (and from other events, drag if you wish).

    private void doEnter(event:Event):void
    {
    DragManager.acceptDragDrop (Image (event.currentTarget));
    }

    private void doDrop(event:Event):void
    {
    your code here
    }
    Don't forget to add:
    Import mx.managers.DragManager;

  • Question [about license and the use of a font]

    I am a representative of a company involved in the production of educational material. We are currently doing books, videos, Web sites and mobile applications.  We have a few questions and a quick response will be a great help for us. 1. If we agree with Adobe CC, can we use the bundled font Myriad Pro for commercial purposes specifically in the production of books, Web sites, mobile applications, videos and as well our company logo? 2. If in the case, we are not allowed to use Myriad Pro, can you please list the situations (or cases) in which we are not allowed to use this font. 3. is it possible to buy a license for situations that mention you in number 2? (We are strongly interested in using Myriad Pro, especially in the realization of the Web site) 4. we intend to use the Myriad Pro in the subtitles of our video clips, but our situation is that we will not make a separate file, but rather, let's do static image in the video. What is your policy (or the license details) for that?  Additional information: we will use Photoshop to our image and Adobe Premiere for our video work.   Thank you very much and a quick response would be greatly appreciated. (I've already sent an email to ) ( [email protected] , but they have yet to respond.)

    [Title edited for clarity... MOD]

    Until an employee gets a read your message, this can help

    Licensing and terms of use | Adobe

  • Windows7 - in the My Pictures folder-need to sort the photos manually - drag and drop used to be how does not work now.

    ....

    Thank you for visiting the Microsoft answers community.

    The change in Windows 7 is to design, but if you think this is something that you want changed, please submit your suggestion on the Microsoft Connect site for your comments.

    Lisa
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Drag and Drop Listbox - help

    Hello! I'm back to LabVIEW programming and fell on a problem that I can't solve.

    I am trying to use dag and drop on a list box. I put to move only and it works fine. The problem is that if I drop the moved element event goes just far. I couldn't find examples or answers in the forums.

    Someone wants to teach me about drag and drop?

    Thank you

    It is not unstraightforward.  Shift register keeps the value of the listbox on departure of drag (ie. the index of the item).

  • Correct answers for drag and drop dialog box

    I'm trying to get a better handle on the different options for drag and drop interactions.

    The right answers dialog box is used only for the edition of the correct answers after a drag and drop interaction has already been created?

    What does the column 'Number' and what is its purpose?

    Hi jay,.

    With the correct answers dialog box, you can get the following,

    1. can I change the answers correct configured.

    2. can define several correct answers to the same question.

    3. can we do good response as a 'combination', or a sequence

    The "count" column allows you to set the correct answer in the following scenario.

    Suppose you have a bunch of oranges (Say 12) while sources drag on and a fruit basket is in the form of the target, and the question is to drag and drop five oranges in the fruit basket; Then, you can configure a drag and drop interaction as follows,

    1. Select all the oranges, mark them as source and add them to the custom type orange

    2. mark "Basket of fruit" as target.

    3. create a correct answer between the oranges and the basket link.

    Now when you open the correct answers dialog box, it shows the correct answer as follows.

    Orange > basketball > 12 fruits.

    You can change the number of 5, the question being 'Drag and Drop five oranges' at the fruit basket.

    I hope this helps.

    Thank you

    VERALINE Sukumaran.

  • Captivate 8 drag and drop interaction does not

    Hi, I work with 8 Captivate and created an interaction drag-and - drop using the wizard to drag / move. For some reason when I preview the interaction some of my sources of drag and others are not. I searched high and low for what I can hurt, but I can not understand. I created types when doing the interaction so it is not sensible that some should work and others don't. Thanks for any help you can provide.

    Hi Vaneppmc1,

    You have disabled the option accept all of the dialog "drag accepted Source. (as seen from your capture screen images).

    If the option "accept all the" is checked, the target can accept 'ALL' sources who are ticked in the column 'Drag Source Types '. In your case, Image 9 can accept sources of type "Bad conscience".

    Since you have unchecked the option accept everything, and the value of Count is 1 (which is default). Here so the target can accept only 1 source of type "Healthy Conscience of the United Nations" and lift reject legend of error on the acceptance of another source.

    Check the option "accept all the ' try and let me know if this works for you.

    If this does not solve your problem please share your Cptx file to address the issue by e-mail ([email protected]).

    Thank you

    Derrick

  • Questions about the reorganization of the rows in the table by drag-and - drop feature

    I am referring to the demo: 106. Drag-and-drop the reorganization of the rows of the table in aCorner of Code DF to implement my case.

    I am facing some problems:

    1. the view object (bound to the table) is read only and it is created directly by very complex SQL queries, without entity objects. When it is run the code: dragRow.removeAndRetain () in the method: DnDAction processDrop (DropEvent dropEvent), it throws the error so that a guest view object is read-only. I want to know if there is another way to delete the moved collection line?

     public DnDAction processDrop(DropEvent dropEvent) {
    ...       
           CollectionModel collectionModel = (CollectionModel) table.getValue();        
            JUCtrlHierBinding treeBinding = (JUCtrlHierBinding) collectionModel.getWrappedData();
            
            //get access to the ADF iterator binding used by the table and the underlying RowSetIterator.
            //The RowSetIterator allows us to remove and re-instert the dragged row
            DCIteratorBinding departmentsIterator = treeBinding.getDCIteratorBinding();               
            RowSetIterator rsi = departmentsIterator.getRowSetIterator(); 
    
            int indexOfDropRow= rsi.getRangeIndexOf(dropRow);
           //get access to the oracle.jbo.Row instance represneting this table row
           Row dragRow = (ViewRowImpl)table.getRowData(draggedRowKey);
           //remove dragged row from collection so it can be added back
           dragRow.removeAndRetain();
           rsi.insertRowAtRangeIndex(indexOfDropRow, dragRow);
          ...
    }
    

    2. When you click on a button, I need to save the command results in the database using the command update # of each rank. Here it is the handler method for the event of the action (in MB) button.

    I want to use RowSetIterator table for encode it from all ranks and update the value # order of each rank.   I call a data control method to run sql update. is it ok? any suggestion?

        public void processSaveOrder(ActionEvent actionEvent) {
            CollectionModel collectionModel = (CollectionModel) mytable.getValue();        
            JUCtrlHierBinding treeBinding = (JUCtrlHierBinding) collectionModel.getWrappedData();
            
            //get access to the ADF iterator binding used by the table and the underlying RowSetIterator.
            //The RowSetIterator allows us to remove and re-instert the dragged row
            DCIteratorBinding iterator = treeBinding.getDCIteratorBinding();               
            RowSetIterator rsi = iterator.getRowSetIterator();
            Row row =rsi.first();
            System.out.println(0+"="+ row);
            int i = 1;
            while(rsi.hasNext()){
                row = rsi.next();
                System.out.println(i+"="+ row.getKey());
                i++;
            }
    
        }
    

    A workaround solution was found:

    In ADF 12 c, it can be solved by changing Updatable "Always" in the details tab of each attributes to read-only view object without entity object.

  • Drag and drop between applications using as3

    Giddayguys

    Research on features just drag-and - d├⌐poser of AS3 in the Air, specifically by dragging an AIR application data in an air application No.  You have no control over what happens to the data once the application without Air?  for example if I click on a datagrid control in the AIR and he copied the text in the column to the Clipboard and then I drag out of the AIR in, for example, Windows Notepad, can I paste data from the Clipboard by a fall?

    Thank you

    Wow, I thought flash.desktop was all the AIR, my mistake, thanks for the info as always kglad!

    And #8 is still correct, there is no simple interface air via drag and drop in another application. The main reason is that other applications will need to be programmed to the win32 message and know how to handle. Some applications may allow it, but you have to respect their API to accomplish this. Less do you a DONKEY win32, chances are that the simple answer to your question is no, this is not possible (for good reasons).

  • To drag and drop questions and serialization in the review of upgrade of 1Z0 - 852?

    Hello

    Does anyone know if the serialization and drag / drop items have been removed from the exam 1Z0-852 of Java SE 6 programmer Certified Professional UPGRADE?

    I know that they have been removed from the exam 1Z0-851, but not sure about the upgrade exam.

    Thanks in advance,

    Alvaro

    Alvaro wrote:
    Hello

    Does anyone know if the serialization and drag / drop items have been removed from the exam 1Z0-852 of Java SE 6 programmer Certified Professional UPGRADE?

    I know that they have been removed from the exam 1Z0-851, but not sure about the upgrade exam.

    Thanks in advance,

    Alvaro

    (1) drag and Drop

    ... this question format will be deleted:

    Ref: http://blogs.oracle.com/certification/entry/0596

    (2) serialization:

    It is best to compare the themes of your notes for the current issues, but according to my reading of the news he is brought at least to some extent:

    http://education.Oracle.com/pls/web_prod-PLQ-dad/db_pages.GetPage?page_id=41&p_exam_id=1Z0_852 (Section 3 API summary):

    Develop code that serializes and deserializes objects using the following APIs from java.io: DataInputStream, DataOutputStream, FileInputStream, FileOutputStream, ObjectInputStream, ObjectOutputStream and Serializable.

  • DataGrid Drag and Drop

    Drag-and - déposer works very well on visually in flex, but I use the control to manipulate an XML object in flex. It works to a certain extent, but duplicated the item instead of moving. It will also update the XML object correctly.

    Here is an example < and source < http://www.cgfolio.com/dragExample/DragDrop.html >

    Excellent! The fix worked and datagrid drag and drop feature works perfectly! Thanks for all the help guys!

  • 'Most visited' disappeared from the My Places bar. I tried all the suggestions about re: config, drag-and - drop, etc. Nothing works. Thoughts?

    The 'most visited' tabs and an RSS feed I use have disappeared from my places bar. They now sit under 'Favorites' and are very annoying.

    I followed all of the suggestions of Mozilla and other sources about the topic: config. Nothing works. I tried to drag and drop 'most visited' return to the places bar, but this does not work, either.

    Can someone please give me a solution?

    Thank you very much.

    patalarga

    You can drag the "bookmarks toolbar items" in the toolbar bookmarks to the Navigation bar if you want to bookmark is displayed on the toolbar.

  • Drag-and-drop questions: arranged randomly moveable elements

    I suspect that the answer is 'no', but maybe an expert could confirm: it is possible to produce a drag-and-drop quiz, in which the movable elements are arranged at random at the beginning of the quiz? The purpose is to ensure that students can not cheat so easily...

    As an alternative, it is possible to create two or three different drag-and-drop (each quiz on a transparency) and quizzes randomly present the student with one of these slides / quiz? I realize other messages than drag-and-drop is not compatible with question pools. I think here is a random, random, blade issues as such.

    The answers would be appreciated.

    I don't think that your first scenario is possible, but I'm not an expert on JS, nor that I have experienced enough with this new accessory CPExtra. However with a good Setup, cheating is not as simple as that for D & D.

    Second scenario seems possible: you can easily generate a random number (example: between 45 and 47 if your slides D & D have these numbers) and use this number for navigation. Of course, you will need to take into account that all navigation will have to be customized (not), because you will need to avoid the other 2 slides are visited. It also means that you need to turn on branch conscious of having to fix the score at the end because the score of the D & D 3 slides will be present in the Total score. Indeed, question pools are not possible for D & D.

  • Is it possible to add a "foot of # question" to a drag and drop?

    Hello

    I'm creating a quiz quiz help and drag and drop them Assistant.  Quiz slides adds a footer to each slide (Question 3 of 15).  If I add a drag and drop to include in the questionnaire, it does not add a header.  Does anyone have a solution?  I use version 7, but also have version 8.

    Thank you.

    Jeff

    Although it looks like a question, D & D is a different beast. It is not also in review, nor in recovery in case you are looking for this as well.

    To create a course indicator also appears so D & D you will need to do it manually; Maybe this post can help?

    Custom indicator progress - Captivate blog

Maybe you are looking for

  • Can't print Photosmart C5280. Error "object GPCore COM has stopped working and was closed".

    I have problems printing my Photosmart C5280 All-in-one on my desktop of Windows Vista 32-bit. I felt for a few years and have only recently met this issue. A few months ago, I set up a home network so I could print from my Toshiba laptop. The printe

  • Acer Aspire V5 473g quality problem (no touch) webcam

    Then Yes. The title is self explanitory. I have this laptop and the webcam looks terrible. And I mean really TERRIBLE. It seems that I'm looking at a rendering of DOOM 2 myself, and it's a relatively new laptop. My sister has a V3 and the cam is at l

  • Overprint script

    Hey guys,.I am new to InDesign scripting and I'm trying to create a script of overprinting.I want the script to change all the small (below 8 PT) text on a document to overprint.I searched the net for overlay scripts, but can't seem to find much on i

  • IOM generated null connection

    Hey guys,.I noticed on two different backgrounds from IOM I have a similar situation, trying to reconcile, for the first time, a large part of the users. They are in the process of reconciliation, but generated connection sucks. On a system, it is my

  • VMware-vSphere-Perl-SDK-5.5.0-1384587 broke up with perl 5.20

    as the subject says, the vmware SDK is broken with perl 5.20.2.The issue of possible priority with operator control in the /usr/share/perl/5.20/VMware/VICommon.pm 2147 line flow.is there a solution?