samedi 20 janvier 2018

DataTable : how to reload/update one row of dataTable? ajax.reload()

I am using MongoDb as my database , laravel for server and angularjs 1.6 for fronted.

How to reload one row of DataTable instead of loading whole content of the DataTable.

I tired like this

setInterval( function () {
data_table.ajax.reload( null, data_table.rows({selected:true}).data()[0]._id );}, 30000 );

I am passing one Id in second argument in ajax.reload API.

I am expecting that the above code will call Laravel show($id) (In controller) method , the updated value of that Id I will fetch from MongoDb return to DataTable so that DataTable will update only that particular row.

I am not sure that my above approach is correct or not, so please help me to figure out How to update one row in DataTable.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2DRI7wJ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire