Tuesday 15 June 2010

Can i use HTTP POST method with jquery datatables sAjaxSource and webapi -



Can i use HTTP POST method with jquery datatables sAjaxSource and webapi -

by default datatables info http method. research got know can configure datatable utilize http post method. following

http://www.datatables.net/examples/server_side/post.html

but problem in code have used(by former developer)

$("#example").datatable({ "bserverside": true, "sajaxsource": 'api/getempall/', "sajaxdataprop": "aadata", "idisplaylength": 10, "bprocessing": true, "blengthchange": false, "spaginationtype": "full_numbers", "aocolumns": [ { "mdata": "firstname","swidth": "100px" }, { "mdata": "lastname" }, ] });

and when seek give "type": "post" not @ calling web api post method. when give "type": "post" , web api's breakpoints never nail @ all.

can please tell me how tell datatables utilize post method "sajaxsource" , web api.

i using datatable , i've noticed have 2 versions of api. code uses "bserverside" while illustration you've posted uses "serverside".

please check if you're using right version. not sure both backward compatible (or worse, if documentations suits library you're using)

try using

"sservermethod": "post"

instead. see legacy documentation @ http://legacy.datatables.net/usage/server-side

jquery datatables web-api

No comments:

Post a Comment