Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1817

Dynamically create table headers and content

$
0
0
Hi guys,

Hoping someone can show me the error of my ways.
I have read quite a bit of the forum and am *mostly* happy with using DataTables.

I have posted a fiddle here:
http://live.datatables.net/idinat/33/edit

Basically, I want to send variables to DataTables for both column headings and table content.
This will change each time I select the table (I have several tables created within a JQuery UI modal, each table on a separate tab).

I'm ok using thistable.empty() and thistable.fnDestroy() when the modal closes so that I can re-init the tables (with the new vaiables) when the modal is opened again. I would like to pass this dynamic data to each table and then init the table just before the modal is opened.

I have probably done something quite silly (missing init option), but I just can seem to get it working.

Any help would be appreciated.
B.

Viewing all articles
Browse latest Browse all 1817

Trending Articles