jQuery Datatable Refresh more than one table simultaneously |
X

Congrats, You are Subscribed to Receive Updates.

jQuery Datatable Refresh more than one table simultaneously


jQuery Datatable Refresh more than one table simultaneously. There some occasions, we need to redraw more than one datatables together. for that, you can’t simply enter the multi selector to do that operations such as the following example.

$('#selct1,#select2, ..').dataTable().fnDraw();

It won’t work for you. you need to do it each one separately.  So we can use jQuery each function to handle it.

var dt_table_id =["#frist_kvcodes" , "#second-kvcodes" , "#third-table" ];

and now for the iterating function.

$.each(dt_table_id, function(index, value){	$(value).dataTable().fnDraw();	});

that’s it.  It will take care of the refresh functions. if you have any doubt or problem with this code comment below.

commenter

About Varadharaj V

The founder of Kvcodes, Varadharaj V is an ERP Analyst and a Web developer specializing in WordPress(WP), WP Theme development, WP Plugin development, Frontaccounting(FA), Sales, Purchases, Inventory, Ledgers, Payroll & HRM, CRM, FA Core Customization, PHP and Data Analyst. Database Management Advance Level

Comment Below

Your email address will not be published. Required fields are marked *

*

Current ye@r *

Menu

Sidebar