Drag and Drop with RowReorder is not working

Drag and Drop with RowReorder is not working

PashaTechPashaTech Posts: 17Questions: 3Answers: 0

Hi,

The following extension is not at all working in the below mentioned link as well as in my local application.

Kindly guide me the way forward in using this extension successfully. I've used both js and css reference in my a

http://datatables.net/extensions/rowreorder/

http://datatables.net/extensions/rowreorder/examples/initialisation/simple.html

Thanks & Regards
Pasha

Answers

  • allanallan Posts: 61,438Questions: 1Answers: 10,052 Site admin

    This example is not working for you? It appears to work okay for me. Perhaps you could describe the error you are seeing and state what browser / oS you are using please.

    Allan

  • FrakEarthFrakEarth Posts: 1Questions: 0Answers: 0

    Hi allan,

    I am thinking about starting a topic for my own problem, however this is as good a place as any to discuss what I'm experiencing, as it may be the same problem affecting the OP.

    On IE9, the example you've posted works perfectly. However, in IE8 or IE9's IE8 Compatability mode, the extension fails without outputting an error to the console. It allows you to drag and re-order your rows once, and then simply stops working. Perhaps something is killing the event listeners or doing something nasty to the DOM on mouseUp. I took a look at the source, but I'm none the wiser to be honest. Looking at my dataSrc column, it updates that correctly on the redraw, its just that the rowReordering selector doesn't become active again for some reason.

    I'm attempting to use this on an internal SharePoint project; the SP version and branding we're using is restricting us to IE8 compat mode - if I hit upon any answers I'll let you know.

  • allanallan Posts: 61,438Questions: 1Answers: 10,052 Site admin

    Thanks for noting that. Fix committed here.

    Allan

  • PashaTechPashaTech Posts: 17Questions: 3Answers: 0

    Hi Allan,

    I'm using IE11 and Windows 8.1.

    I couldn't drag and drop using mouse and nothing happens when i tried to click and drag the record.

    Pasha

  • allanallan Posts: 61,438Questions: 1Answers: 10,052 Site admin

    Are you using the version with the fix I committed above? If so, can you give me a link to the page so I can debug it please.

    Allan

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75

    What version jQuery? My issue was the wrong jQuery version, fixed that and it worked like a charm

  • PashaTechPashaTech Posts: 17Questions: 3Answers: 0

    It works like a charm now with latest version of library. Can the same library be used to drag and drop between tables?

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75

    No... That would be a cool idea though...

    Make a plugin for it! :P

  • PashaTechPashaTech Posts: 17Questions: 3Answers: 0

    I'd developed drag and drop feature between DataTables using jQuery sortable but i'm facing issue with respect to performance.

    It takes around 3 to 4 secs initially to display the dragged object on the page when there are thousand records and multiple columns(45 columns).

    Any help on this regard would be highly appreciated.

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75

    Whats the data source type?

  • PashaTechPashaTech Posts: 17Questions: 3Answers: 0

    Data Source type is JSON

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75

    Is deferRender set to true?

  • PashaTechPashaTech Posts: 17Questions: 3Answers: 0

    yes its set to true. Below is the code snippet.

    ajax: "SampleData_45Cols.txt",
    deferRender: true,
    scrollY: 200,
    scrollCollapse: true,
    scroller: true,
    columns: [....],
    columnDefs: [{...}]

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75

    Idk, id need to replicate it, sorry

  • PashaTechPashaTech Posts: 17Questions: 3Answers: 0

    Any other suggestion would be highly appreciated.Thanks!

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75

    Show us all the code related to this dt instance. Use syntax highlighting

  • PashaTechPashaTech Posts: 17Questions: 3Answers: 0

    Issue has been resolved by making changes in the helper function of jQuery sortable. Generally loading, dragging and scrolling are pretty slower in IE unlike Chrome,Firefox which is pretty faster.

    Any help on the IE fix would be highly appreciated. Thanks!

  • allanallan Posts: 61,438Questions: 1Answers: 10,052 Site admin

    Drag and drop between tables isn't something that RowReorder will likely support natively, but it could be handled using events I think. That's something too look into for certain - thanks.

    Allan

This discussion has been closed.