How to align multiple datatable side by side?

How to align multiple datatable side by side?

vaishnavkokavaishnavkoka Posts: 132Questions: 23Answers: 1

In my project i am using nearly 6 datatable , on the top of my navigation tab i would like to align the datatable side by side as you can see in the below picture
I am using ajax and php to retrieve data from my database( real time) updation of rows takes place, for those 3 tables i maintaining 3 separate ssp.class files in separate folder.
Now I would like to align the datatable side by side in a single webpage as shown in the below picture.

I think these can be achieved using bootstrap div tags but still i would like to know.

Thanks
Koka

Answers

  • colincolin Posts: 15,232Questions: 1Answers: 2,597

    Hi @vaishnavkoka ,

    Yep, you just need to put each table into it's own container, with all three containers aligned.

    Cheers,

    Colin

  • vaishnavkokavaishnavkoka Posts: 132Questions: 23Answers: 1
    edited July 2018

    Hi @colin ,
    But How do i align them?
    what about the ssp.class files?
    Initialization of table wont cause an error? cuz earlier i got the error when i tried to use the jquery to initialise the datatable.

  • colincolin Posts: 15,232Questions: 1Answers: 2,597

    That's general HTML stuff, that's not a DataTables issue. Do a Google search for "html align multiple containers" and you'll get plenty of hits.

  • vaishnavkokavaishnavkoka Posts: 132Questions: 23Answers: 1

    Yeah but initialization of multiple datatable in a single page will to error right? cuz earlier i initialized the same datatable twice to increase the functionality but i gave an error. That's one of the reason i have asked you these question.

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    i initialized the same datatable twice to increase the functionality but i gave an error.

    So don't initialize the same DataTable twice. DT initialization has absolutely nothing to do with HTML container alignment.

  • kthorngrenkthorngren Posts: 20,971Questions: 26Answers: 4,885
    edited July 2018

    Follow the steps in the link provided in the error:
    https://datatables.net/manual/tech-notes/3

    The steps should provide you with the steps needed to fix the error. Also take a look at this example:
    https://datatables.net/examples/basic_init/multiple_tables.html

    As explained above where they are placed on the page is outside the scope of Datatables.

    Kevin

This discussion has been closed.