Results 1 to 5 of 5

Thread: How can I know when a drag starts from a grid?

  1. #1

    Question How can I know when a drag starts from a grid?

    The subject says it all.

    The GridView doesn't hold on to a reference to its GridDragZone; even if it did, the GridDragZone overrides onInitDrag so that it no longer calls onStartDrag.

    How can I be informed when someone has started dragging something out of my Grid?

  2. #2
    Ext User sonic64's Avatar
    Join Date
    Apr 2007
    Location
    Casablanca, Morocco
    Posts
    112

    Default

    Well, you can only drag and drop to the same grid.

  3. #3

    Default

    Quote Originally Posted by sonic64 View Post
    Well, you can only drag and drop to the same grid.
    Not true. Case in point: in my application, I drag from a grid into a tree, and onto some arbitrary divs.

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854

    Default

    Just guessing here by looking at the source. It looks like DragSource.onStartDrag is just an interface function that you can override to do whatever you need.

  5. #5

    Default

    Quote Originally Posted by tryanDLS View Post
    Just guessing here by looking at the source. It looks like DragSource.onStartDrag is just an interface function that you can override to do whatever you need.
    Yes, and if the grid's DragSource were accessible, that would be a handy fact to know. But, as I took care to point out in the original post, it's not.

    I've worked around this problem by configuring the grid as not draggable, and then adding a custom GridDragZone by hand, overriding its onDragInit method, essentially duplicating library code. I'm hoping that's not necessary.

Posting Permissions

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