How to do server side API
How to do server side API
lukesweet08
Posts: 3Questions: 0Answers: 0
Hey everyone,
So I got the DataTables to work and I gotta say, they look great. However, I'm trying to implement some of the API functions onto the table such as fnAddData and fnDeleteRow, but the problem is that I'm doing server side processing. I realize that I need to call these functions onto the server since DataTables doesn't know if the data is coming from client side or server side. I was just wondering if I could get some help on doing this. I'm currently doing this through an ajax source, and I just want to know where to put the functions so they call them to the server. Thanks!
So I got the DataTables to work and I gotta say, they look great. However, I'm trying to implement some of the API functions onto the table such as fnAddData and fnDeleteRow, but the problem is that I'm doing server side processing. I realize that I need to call these functions onto the server since DataTables doesn't know if the data is coming from client side or server side. I was just wondering if I could get some help on doing this. I'm currently doing this through an ajax source, and I just want to know where to put the functions so they call them to the server. Thanks!
This discussion has been closed.
Replies
So my advice would be to forgot using the API functions for data manipulation when server-side processing, and just make an XHR call to the server to add / delete rows as required (obviously the server-side scripts would need to cope with that) - then call fnDraw() on the table to have it redraw with the new data.
Allan