2 Replies Latest reply on Jul 16, 2007 6:00 AM by sivudu

    issues in Drag-n-Drop --- Need  Help

    sivudu Level 1
      Hi All,

      I have couple of doubts in Drag-n-Drop. I have special requirements in drag and drop.

      1. Suppose if user drags some element(suppose 53) and drops it on target element(suppose 241) where I should give one confirmation window contains the followings message

      "Do you want to replace 241 with 53 "

      Suppose if user clicks on ok button then I replace the element. else I have revert the drag operation i.e. I have to put drag element in original place.

      2.Because I have special requiremnts I used Grids inside of Canvas. For Canvas component I intialised the verticalScrollPolicy="on" horizontalScrollPolicy="on" . So if GridItems exceeds the width the horizontalScroll automatically appears.

      To acheive these requirements I have been facing the following problems.

      i. what is an equivalent one in Flex for confirm window of javascript.
      ii. Suppose if user clicks on cancel button how can I revert/cancel the drag operation.
      iii. So I have intialized the horizontal and vertical scroll, if I drag the element the it is not possible to drop the element inside of scroll ohh sorry here I am unable to explain the problem correctly. To solve this how can I integrate mouse movements with horizontal/vertoical scrolls.

      Here is the source code. So you get correct Idea of iii issue.

      Any help/suggestions in this issues.Really I have been struggling for last 4 days to solve these issues. Could anybody suggests me to overcome these issues.

      Siva Kumar.
        • 1. Re: issues in Drag-n-Drop --- Need  Help
          Rahul Mainkar
          Hi Siva,
          To solve your confirmation window querry, click Here.
          I wont be able to write a code here, hence giving you this link. I will guide you nicely thru the alerting process.

          I will surely try to solve your other queries, but I need some time for that.
          Till the time you can go through the above mentioned link.

          • 2. issues in Drag-n-Drop --- Need  Help
            sivudu Level 1
            Hi Rahul,

            Thanks for ur assurance. Once again here I am explaning my problems clearly.So far I am able to display the confirmation window with proper message. I am able to get the elements of sorce element and destination element.
            Because I have to display differnt lengths/widths of colums of row I used <Grid>'s inside of <Canvas> instead of <DataGrid>( I used <Canvas> just to initialize horizontal / vertical scrolls ) . These are the problems I have been facing.

            1. As I displayed the confirmation window if user clicks on 'Cancel' button how should I cancel / revert the drag operation i.e. how can I put back the source element to original place.

            2. As I enabled the horizontal / vertical scrolls of Canvas , is it possible to drag the element upto the end of the Grid ( Suppose if I used <DataGrid> it takes care of integrating mouse movents with the scroll ) . How can I integrate the dragged element ( mouse ) movements with <Canvas> scrolls. I mean how can add the autoScrolling feture to the <Canvas>.

            Rahul ,please guide me to solve my problems. I will be greatful to u.

            Thanks & Regards,
            Siva Kumar.