Results 1 to 2 of 2

Thread: Detecing Draggin in a Grid

  1. #1
    Ext User
    Join Date
    Jun 2007
    Location
    Washington, D.C.
    Posts
    29

    Default Detecing Draggin in a Grid

    I'm trying to make an EditorGrid where the user can use his mouse to select multiple cells in the grid without necessarily selecting the entire row.

    I have already developed a custom selection model which allows me to select the cells like this using a Shift Click or with the arrow keys and the shift button. However, I have been unable to figure out how to implement selection by mouse dragging.

    Essentially all I need to know is when does a user start dragging his mouse, and when does the cursor move to another cell (in addition to what cell that is). Once I have that information, it's trivial to update it with the code I already have.

    I've tried experimenting with various DragDrop events and objects in the dd package, but I haven't been able to come up with anything where I can determine what cell I'm dragging over.

    Could someone offer me some tips on how to do this or point me to a good tutorial?

    Thanks.

  2. #2
    Ext User
    Join Date
    Jun 2007
    Location
    Washington, D.C.
    Posts
    29

    Default

    Sorry for the double post, but I could really use some help with this.

    I think I'd have a simple enough solution if I could actually get the function "grid.getView().getCellFromPoint(xy[0], xy[1]);" from this post Jack made a while ago:

    http://extjs.com/forum/showthread.ph...ight=drag+grid

    But as far as I can tell that function doesn't exist and there doesn't seem to be an obvious way to derive it.

Posting Permissions

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