refresh data table after create action

refresh data table after create action

vinod_ccvvinod_ccv Posts: 75Questions: 0Answers: 0
edited April 2013 in Editor
Hi,
Even though new row is added on completion of a create operation it does not give live data base status which may be updated by another user.
Is there any provision to refresh the data table on completion of a Create operation by the editor ? My data table is initialized by json data from a GET url.
Hope for your reply
Regards
Vinod

Replies

  • allanallan Posts: 63,512Questions: 1Answers: 10,472 Site admin
    So basically you want to refresh the whole table? Currently you need to use the fnReloadAjax API plug-in to do that - although that ability will be built into DataTables 1.10.

    Allan
  • vinod_ccvvinod_ccv Posts: 75Questions: 0Answers: 0
    Yes Allan, i am looking for refresh the table data.
    Whether I have to use oTable.fnReloadAjax() as call back in $ajax function in place of success call back?
    or
    Can I use it inside a onPostCreate event of the editor so that it will reload the whole table soon after a create action is successful?
    Please help to clear the confusion
  • allanallan Posts: 63,512Questions: 1Answers: 10,472 Site admin
    edited April 2013
    The latter one I would say, from your earlier description. If you what to have the full table reloaded on a local update, then use the onSubmitSuccess event to call fnReloadAjax (that event will fire at the end of every update create / edit / remove).

    Allan
This discussion has been closed.