insert 2 tables next to each other

insert 2 tables next to each other

gabber3000gabber3000 Posts: 2Questions: 0Answers: 0
edited April 2014 in DataTables 1.9
hi, I need to insert 2 tables next to each other, could you help me? I try with DataTables multiple but it inserts the pagination in each page, and I do not it but something in one or more pages! tks bye bye

Replies

  • gabber3000gabber3000 Posts: 2Questions: 0Answers: 0
    I add a code example:

    #table1




    test
    test 1




    #table 2




    test
    test 1




    how can I create this using a single pagination?
  • allanallan Posts: 61,669Questions: 1Answers: 10,096 Site admin
    edited April 2014
    So the two tables have an identical number of records? The problem you'll have is that each DataTable is 100% independent. So what you will need to do is attach an event listener for the `page` event ( http://next.datatables.net/reference/event/page ) to each table and detect which table is emitting the event and then change the paging for the other table. If you only have one paging control, then its probably a little easier.

    You'll also need to keep sorting in-sync as well I guess, so it might be a bit tricky.

    Allan
This discussion has been closed.