jQWidgets Forums

jQuery UI Widgets Forums Grid Determine 'dropTarget' in 'DragEnd'

This topic contains 1 reply, has 1 voice, and was last updated by  kennylouie 12 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Determine 'dropTarget' in 'DragEnd' #11497

    kennylouie
    Member

    I’m trying to implement drag and drop from one jqxGrid to another. However, the twist is that when the originating jqxGrid loads, there’s a good chance the destination jqxGrid would not have been created yet. And to make things even more interesting there may be more than one destination jqxGrid.

    I’ve tried a few strategies with no sound solution. After fiddling with initFeedback and poking at the properties of the DragEnd event (event.originalEvent.target) it seems possible but with the current feedback configuration the actual feedback element seems to be getting in the way determining the drop element in the dragEnd event.

    The change I made to initFeedback was to remove the height setting:
    initFeedback: function (feedback) {
    //feedback.height(25);
    feedback.css(‘background’, ‘#aaa’);
    },

    This caused weird things to happen to the feedback row but it essentially kept it clear of the mouse cursor when dragging stuff off the originating jqxGrid. When dropping to the destination grid I can at least get at the ‘target’ element in event.originalEvent.target.

    Long story short the above experiment just doesn’t sound right and I’m wondering if there’s a better way of doing what’s stated in the topic?

    Determine 'dropTarget' in 'DragEnd' #11498

    kennylouie
    Member

    Actually I kind of hacked the _getRelativeOffset function in jqxdragdrop.js to keep the feedback element away from the mouse cursor as it’s being dragged around… which allows the drop element to be determined in DragEnd. Still wondering if there’s a better way of doing this though.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.