Group Subtotal datatable at the bottom

Asked

Viewed 35 times

1

I have a datatable with subtotal. jsfiddle, but this subtotal is at the top and needs to appear at the bottom as subtotal.

Doing tests I found out that it generates the TR when it goes through this line of code

if (last !== group) {
    groupid++;
    $(rows).eq(i).before(
        '<tr class="group"><td>' + group + '</td></tr>'
    );
    last = group;
}

How I would make this TR generate at the end and not at the beginning of each item?

  • Try replacing ". before" with ". after".

  • I tried to change it, but it just skips a line and doesn’t solve it. It would have to be at the end of the list.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.