datatable pagination/web api
datatable pagination/web api
I want to integrate datatable to web API (http post request).
web API takes (start, offset) as input for pagination. web API returns data in json format. Web API is provided by third-party and i cannot change it.
I have seen examples for server side processing of datatables. In these examples client side calls http post API by passing request object to it. Server side is returning data based on requested parameters (including pagination, filtration options).
I can not make server side processing related changes in web API i am using.
Please suggest me possible options for integrating web API with datatable having pagination support in it.
Answers
You would need to use
ajax.datato manipulate the data submitted to the server to match the API andajax.dataSrcto manipulate the returned data to match what DataTables needs.The client / server parameters DataTables uses are documented in the manual.
Allan