Results 1 to 3 of 3

Thread: One Way Drag & Drop

  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    61
    Answers
    3

    Default Answered: One Way Drag & Drop

    Good day all!!!

    I have seen the example on dragging and dropping from one grid to another, and I can make my own and make it work. But for mine I would like to implement the following:

    1. Dragging must not remove/delete row from the grid (Now know that I have to set 'copy: true', others say 'allowCopy: true')
    2. Dragging and dropping should be one way. User should only be able to drag from grid1 to grid2 and not the other way round.
    3. Grid2 has fields that are not in Grid1. How do I set the default values for these fields so that they show when a row is drop in the grid.
    4. And finally, in the example the drop listener in view. How would I referrence this event from my controller.


    Your help is appreciated... If a code example is available; thank very much

  2. If you don't want one grid to be able to be dragged from, set enableDrag to false on the plugin.

    This is probably the cause of the confusion:

    Code:
    copy: view.copy || (view.allowCopy && e.ctrlKey)

  3. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,450
    Answers
    3997

    Default

    If you don't want one grid to be able to be dragged from, set enableDrag to false on the plugin.

    This is probably the cause of the confusion:

    Code:
    copy: view.copy || (view.allowCopy && e.ctrlKey)
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    61
    Answers
    3

    Default

    Thanx a lot mitchellsimoens. That answers 1 and 2. I have those working the way I want.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •