Change data source dynamically

Change data source dynamically

ediskradediskrad Posts: 2Questions: 1Answers: 0

Good afternoon,

New with Datatables and Jquery, so maybe my question is naive. Here I go: I would like to have a <select> which allows me to select the source database table (and so the columns) showed in the table.

Any advice or suggestion?

Kind regards,

David

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    You would need to use ajax sourced data to get the table's data - examples here. You could either hard-code which tables are on the server if they're static, or you could issue another ajax request to a different script get a list of tables to populate the select element.

    Colin

  • ediskradediskrad Posts: 2Questions: 1Answers: 0

    Hi Colin,

    Thanks for your post. I will check it!

    Kind regards!

This discussion has been closed.