5 Replies Latest reply on Nov 26, 2008 8:05 AM by Newsgroup_User

    drag and drop - tree to datagrid

    tolson77r Level 1
      I am having trouble getting a datagrid accept the data that has been dragged from a tree loaded with data from an xmllistcollection. The code is pasted below and thank you very much for your time and insight!



        • 1. Re: drag and drop - tree to datagrid
          Level 7

          "uksurf77" <webforumsuser@macromedia.com> wrote in message
          news:ggepml$dcn$1@forums.macromedia.com...
          >I am having trouble getting a datagrid accept the data that has been
          >dragged
          > from a tree loaded with data from an xmllistcollection. The code is
          > pasted
          > below and thank you very much for your time and insight!

          Specific description of the problem? Errors?


          • 2. Re: drag and drop - tree to datagrid
            tolson77r Level 1
            Hi Amy, thanks for replying. What is frustrating about this is the fact that there are no errors, otherwise it would be someplace to start. When you run the application, it seems to work ok. When you attempt to drag anything from the tree it appears to work fine (gives you a green 'plus' graphic) but when the selection is dragged over to the datagrid, it will not allow you to drop the selection. Instead it gives you a red stop graphic and the procedure fails. I wonder if I am missing an attribute or have one incorrectly set.

            Thanks again and sorry for the vague description. It seems like a vague problem.
            • 3. Re: drag and drop - tree to datagrid
              Level 7

              "uksurf77" <webforumsuser@macromedia.com> wrote in message
              news:gghdrt$pe3$1@forums.macromedia.com...
              > Hi Amy, thanks for replying. What is frustrating about this is the fact
              > that
              > there are no errors, otherwise it would be someplace to start. When you
              > run
              > the application, it seems to work ok. When you attempt to drag anything
              > from
              > the tree it appears to work fine (gives you a green 'plus' graphic) but
              > when
              > the selection is dragged over to the datagrid, it will not allow you to
              > drop
              > the selection. Instead it gives you a red stop graphic and the procedure
              > fails. I wonder if I am missing an attribute or have one incorrectly set.
              >
              > Thanks again and sorry for the vague description. It seems like a vague
              > problem.

              Try starting out the DataGrid with an empty dataProvider so it has something
              to add to.

              HTH;

              Amy


              • 4. Re: drag and drop - tree to datagrid
                tolson77r Level 1
                Do you mean assigning the datagrid an empty variable to store the data that is dropped in it? Or a model like I attached as an example? The model doesn't work but I just wonder if that is the concept you are getting at. I have been scouring the documentation for days on this and am just not finding what I need, and I am sure its just because i have gotten my mind twisted in a knot and don't know where to look now. If possible can you provide me a topic to focus my attention on? Thanks and sorry to be bothering you with what seems like a silly problem.
                • 5. Re: drag and drop - tree to datagrid
                  Level 7

                  "uksurf77" <webforumsuser@macromedia.com> wrote in message
                  news:ggj0qo$qnl$1@forums.macromedia.com...
                  > Do you mean assigning the datagrid an empty variable to store the data
                  > that is
                  > dropped in it? Or a model like I attached as an example? The model
                  > doesn't
                  > work but I just wonder if that is the concept you are getting at. I have
                  > been
                  > scouring the documentation for days on this and am just not finding what I
                  > need, and I am sure its just because i have gotten my mind twisted in a
                  > knot
                  > and don't know where to look now. If possible can you provide me a topic
                  > to
                  > focus my attention on? Thanks and sorry to be bothering you with what
                  > seems
                  > like a silly problem.
                  >
                  >
                  > <mx:Model id="criteriaCol">
                  > <criteria>
                  > <label/>
                  > <data/>
                  > </criteria>
                  > </mx:Model>


                  Try just creating a new XMLListCollection and assigning that as the
                  dataprovider.

                  HTH;

                  Amy