Hi Everyone,
I'm using jQuery 1.3.2, Django and DataTables 1.4.
I have a series of drop-downs that filter an object by foreign keys. When a selection is made, an Ajax call is fired, Django renders my JavaScript where I am dynamically creating the table, iterating over objects, etc, and then I eval the returned JavaScript to update the page.
I'm having an awfully hard time getting options like hidden columns and row-level callbacks to fire. Populating the Data Table this way is a snap, and is working properly, but evaling something like:
$('#my_table').dataTable(...{function(nRow, aData, iDisplayIndex){$('td:eq(1)', nRow).html('foo');}...);
Throws all sorts of errors. Am I going about re-populating the Data Table from a dynamic source in the correct manner? If not, what is the preferred way?
TIA,
Brandon
I'm using jQuery 1.3.2, Django and DataTables 1.4.
I have a series of drop-downs that filter an object by foreign keys. When a selection is made, an Ajax call is fired, Django renders my JavaScript where I am dynamically creating the table, iterating over objects, etc, and then I eval the returned JavaScript to update the page.
I'm having an awfully hard time getting options like hidden columns and row-level callbacks to fire. Populating the Data Table this way is a snap, and is working properly, but evaling something like:
$('#my_table').dataTable(...{function(nRow, aData, iDisplayIndex){$('td:eq(1)', nRow).html('foo');}...);
Throws all sorts of errors. Am I going about re-populating the Data Table from a dynamic source in the correct manner? If not, what is the preferred way?
TIA,
Brandon