Row details slideUp() and slideDown() support

Row details slideUp() and slideDown() support

babablacksheepbabablacksheep Posts: 41Questions: 23Answers: 0

Hi,
REF : http://datatables.net/examples/server_side/row_details.html
Is it possible to use slideUp(),slideDown() and other animations instead of just .show() and .hide() ?

This question has an accepted answers - jump to answer

Answers

  • babablacksheepbabablacksheep Posts: 41Questions: 23Answers: 0

    Hi,
    any update on this :( ?
    Or How can I add my own function ?

  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    Answer ✓

    You would need to insert a consider into the child row and then animate that.

    There is an old blog post (and apparently not working properly at the moment) which shows how that method can be done with the old API: http://datatables.net/blog/2011-06-19 . You can do something similar with the new API.

    Allan

  • isherwoodisherwood Posts: 10Questions: 0Answers: 0

    Thank you, Allan. I looked at that post a number of times while building my table. Would you be able to give some hints as to the translation to the new api? I'm using something like this:

    newChildRow.child(newChildRowData).show();

    clickedRow.addClass('shown');

  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin

    I'll try to make some time sometime to update the post.

    Allan

  • babablacksheepbabablacksheep Posts: 41Questions: 23Answers: 0

    Yes, please post a complete solution as you did with 1.9. Much appreciated

  • isherwoodisherwood Posts: 10Questions: 0Answers: 0

    Bump. Any progress?

    Thanks much.

  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin

    Nope - been working on other things. It will be available at http://datatables.net/blog when I'm able to work on it.

    Allan

  • stelcostelco Posts: 3Questions: 1Answers: 0
    edited September 2014

    Hi, is there any update on this for animation? Ide like to implement JQuery slideUp and slideDown to my code? Thanks.

        // Add event listener for opening and closing details
    
            $('#auditable tbody').on('click', 'td.details-control', function () {
                var tr = $(this).closest('tr');
                var row = table.row(tr);
    
                if (row.child.isShown()) {
    
                    // This row is already open - close it
    
                    row.child.hide();
                    tr.removeClass('shown');
                }
                else {
    
                    // Open this row
    
                    row.child(format(row.data())).show();
                    tr.addClass('shown');
                }
            });
    
  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin

    Not yet. I'll post the blog post as soon as I have written it. Will be early next week now.

    Allan

This discussion has been closed.