1

i want to use gridjs width my own Table.

What i have is:

        <script>

        $("table#myTable").Grid
        (

            ({
                pagination: true,
                from: $("table#myTable").current
            })
        );

    </script>

But the script say me

Uncaught TypeError: container is undefined

Can you Help me Please.

StandBy1
  • 21
  • 1

1 Answers1

0

If you want to create Grid.js table from an existing HTML table, simply reference your table in the jQuery selector and leave the from config empty, e.g.

$("table#myTable").Grid({ pagination: true });

The jQuery wrapper understands that your element is an existing table and uses the from config automatically, see https://github.com/grid-js/gridjs-jquery

Afshin Mehrabani
  • 33,262
  • 29
  • 136
  • 201