Jquery Datatable server side pagination

Jul 2 2019 1:08 AM
Hi, I need help I'm not able to implement Server side pagination with JQueryDatatable + WCF seb service.
 
I have written Storeprocedure and all required code and I have tested with Handler and Webservice there it is working as expected but same thing I am trying to implement with WCF Function then it is not working ...
 
I think something I miss on WCF OperationContract Or maybe when I'm calling that function..
 
Here is my code
 
1. WCF
  1. [OperationContract]  
  2. [WebInvoke(Method = "POST", UriTemplate = "GetEmployees")]  
  3. string GetEmployees(int iDisplayLength, int iDisplayStart, int iSortCol_0, string sSortDir_0, string sSearch);  
  4. public string GetEmployees(int iDisplayLength, int iDisplayStart, int iSortCol_0, string sSortDir_0, string sSearch)  
  5. {}  
2. AJAX
  1. $('#tblEmpList').dataTable({  
  2. "paging"true,  
  3. "ordering"true,  
  4. "filter"true,  
  5. "destroy"true,  
  6. "orderMulti"false,  
  7. "serverSide"true,  
  8. "Processing"true,  
  9. "ajax":  
  10. {  
  11. "url""/RouMaster/Services/RouService.svc/rest/GetEmployees",  
  12. "type""POST",  
  13. "dataType""JSON"  
  14. },  
  15. "aoColumns": [  
  16. {  
  17. "mDataProp""Id",  
  18. "visible"true  
  19. },  
  20. "mDataProp""EmpName" },  
  21. "mDataProp""Address" },  
  22. "mDataProp""Phone" }  
  23. ]  
  24. });  
But it is not working
 
not going to methods
 
Next i tried
  1. [OperationContract]  
  2. [WebInvoke(Method = "POST", UriTemplate = "GetSSFPApplicationList?iDisplayLength={iDisplayLength}&iDisplayStart={iDisplayStart}&iSortCol_0={iSortCol_0}&sSortDir_0={sSortDir_0}&sSearch={sSearch}")]  
  3. string GetSSFPApplicationList(int iDisplayLength, int iDisplayStart, int iSortCol_0, string sSortDir_0, string sSearch);  
but values are going 0 always ...
 
Can anyone help me how to do actually with WCF
 
I Am not doing any MVC application its normal Asp.net Application with WCF Webservice ...
 
Please someone help me to solve this issue. 

Answers (2)