Event Processing Complete

Event Processing Complete

LuigiMdgLuigiMdg Posts: 8Questions: 0Answers: 0

Hi..
I'm using the event Processing, but is not perfect..
Exist an Event that work when the Processing is Complete?

This is the code that I'm using now:
$('#giacenze').on( 'processing.dt', function () {
ordini();
} );

Replies

  • rf1234rf1234 Posts: 2,987Questions: 87Answers: 421

    Just try a couple of other events listed here https://datatables.net/reference/event/

    The init event is probably what you are looking for:
    https://datatables.net/reference/event/init

    "The init event is the event compliment of the initComplete initialisation option. Like the callback, the init event is called when your table has fully been initialised, data loaded and drawn ..." i.e. when processing has been completed.

  • LuigiMdgLuigiMdg Posts: 8Questions: 0Answers: 0

    Yes, but init work on the first loading.. When I change the page or sorting they not replay the action that I need :/

  • rf1234rf1234 Posts: 2,987Questions: 87Answers: 421

    you will probably need to use several events: check the order event (sorting) or the length event for example.

    Alternatively you could use a timeout like this

    $('#giacenze').on( 'processing.dt', function () {
        setTimeout(function () {
              ordini();
        }, 500);
    } );
    
  • LuigiMdgLuigiMdg Posts: 8Questions: 0Answers: 0

    Not work fine..
    Doesn't exist an event that work on the end of loading?
    This work when I click and when the data loading is end

  • rduncecbrduncecb Posts: 125Questions: 2Answers: 28

    If you need to do something when changing the page or sorting the draw should be usable.

  • LuigiMdgLuigiMdg Posts: 8Questions: 0Answers: 0
    edited July 2017

    draw is perfect!!!
    Thank you so much!!!

This discussion has been closed.