Ris
Ris

Reputation: 1164

Data table refresh table

I have a data table with "edit" link to open custom form in edit mode like,

enter image description here

When edit link is clicked form is opened in the edit mode something like,

enter image description here

What I am trying to do is to refresh data table specific record when record is edited and saved in the opened tab without reloading parent window.

Can it be accomplished ?

Upvotes: 0

Views: 613

Answers (1)

Gyrocode.com
Gyrocode.com

Reputation: 58860

You can use row().data API method to set data for the row if you store row index or node after user clicked on the row.

table.row($row).data(d).draw();

If your table data source is Ajax and you update the server after the row has been edited as well via Ajax, it makes sense to reload the table instead with ajax.reload() API method. For example:

// Reload table without resetting the current page
table.ajax.reload(null, false);

Upvotes: 1

Related Questions