datatable field type - Ajax reload

datatable field type - Ajax reload

json81json81 Posts: 24Questions: 6Answers: 1

Hi!
Is it possible in some way to reload the initial ajax-data for the new field type "datatable"?

I have tried to do it with dependent and reload the ajax-data based on the row I edit but I can't figure out how to replace the table data with the new ajax-data. I guess it could be done with options() but as it can be set with ajax-data initial it would be easier to reload the ajax-data directly?

/Anders

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    Yes - you can get the DataTable API instance using the dt() method of the datatable field type - so you could do:

    editor.field('myField').dt().ajax.reload();
    

    Allan

  • json81json81 Posts: 24Questions: 6Answers: 1

    Thank you Allan!

This discussion has been closed.