remove all data before import

remove all data before import

hminhduchminhduc Posts: 22Questions: 13Answers: 1

Im very happy with new import from csv function in extension of Editor. But before to do that i want delete all exsiting data on datatable. Im using ajax path same as below:

remove: {
type: 'DELETE',
url: 'hoshu/editor_delete?id={id}'
}
remove data doing with small amount of data but when about 120 row then it stoped. parameter post to server too long. id and data.

So how can i send id only to server.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,531Questions: 1Answers: 10,475 Site admin
    Answer ✓

    You can use ajax.data to remove data from the object that is used to construct the request - e.g.:

    remove: {
      type: 'DELETE',
      url: 'hoshu/editor_delete?id={id}',
      data: function (d) {
        delete d.data;
      }
    }
    

    Allan

Sign In or Register to comment.