can I use DataTable for only one table?

can I use DataTable for only one table?

Ilian_99Ilian_99 Posts: 2Questions: 1Answers: 0

Hello! The situation is as follows: I added a DataTable to my project. It consists of a large table in the main page and 7 buttons that open dialog modаls in which there is one table. I want this plug-in to have an effect only on the big table and not to hang the small tables in the modals. Is it possible for this to happen?

This question has an accepted answers - jump to answer

Answers

  • tangerinetangerine Posts: 3,013Questions: 24Answers: 355
    Answer ✓

    Yes, of course. Just follow the simple example.
    https://datatables.net/examples/basic_init/zero_configuration.html

  • Ilian_99Ilian_99 Posts: 2Questions: 1Answers: 0

    Maybe I'm not doing something right. After adding only the table that interests me with this script:
    $ (document) .ready (function () {
    $ ('# example'). DataTable ();
    });
    The other tables lose their functionality. Each of them adds a line by pressing a button. after adding this script the tables become unusable.

  • tangerinetangerine Posts: 3,013Questions: 24Answers: 355

    It's not possible to make a diagnosis from such a brief description.
    Please provide a link to a test case, in accordance with the forum rules.
    https://datatables.net/manual/tech-notes/10

Sign In or Register to comment.