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

Can't able to redraw Datatable

$
0
0
Hello,

I have a Datatable on page, and Also I put a link to reload this Datatable (User interaction is required to refresh Datatable, and for some reason I have to put refresh link outside of Datatable Division.) and this is a ServerSide Datatable.

On page load I got my Datatable loaded but when I clicked on refresh link It is not working.

My refresh link click event is :
$(document).on('click', '#refreshLinkId', function (event) { event.preventDefault(); var tblId = $(this).attr("type") + "_wrapper";//getting Datatable ID var table = $(tblId).dataTable(); table.fnDraw(); $('#refreshConfirmDialogId').data('tableInst', table ); $('#refreshConfirmDialogId').dialog("open"); });
When I click the link I got this Warning :

DataTables warning: Attempted to initialise DataTables on a node which is not a table: DIV

and got this error too when I try to call fnDraw or any other internal Method of DataTable instance(found through Firebug) :

TypeError: a is null
[Break On This Error]

...Sort ? O(a, a.oPreviousSearch) : a.oFeatures.bFilter ? K(a, a.oPreviousSearch) :...

Does anybody knows, whats wrong with my code? Also I want to redraw my Datatable with extra server param on refresh link click which will be added to Ajax Request to get Modification in Database and return new Data, I do not know how can I do that?

Please let me know if there is a solution for this?

Thank you.

Viewing all articles
Browse latest Browse all 124

Trending Articles