Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi, i need help im 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 theire it is working as expected but same thing i am trying to implement with WCF Function then it is not working ...
 
I think somthing i miss on WCF OperationContract Or may be when im calling that function..


What I have tried:

1. WCF 
 
[OperationContract]        
[WebInvoke(Method = "POST", UriTemplate = "GetEmployees")]       
string GetEmployees(int iDisplayLength, int iDisplayStart, int iSortCol_0, string sSortDir_0, string sSearch); 

public string GetEmployees(int iDisplayLength, int iDisplayStart, int iSortCol_0, string sSortDir_0, string sSearch)        
{}

 ==================
 
2. AJAX
 
$('#tblEmpList').dataTable({               
"paging": true,               
"ordering": true,               
"filter": true,               
"destroy": true,               
"orderMulti": false,               
"serverSide": true,               
"Processing": true,                 
"ajax":               
{                   
"url": "/RouMaster/Services/RouService.svc/rest/GetEmployees",
"type": "POST",                   
"dataType": "JSON" 
},               
"aoColumns": [                   
{                       
"mDataProp": "Id",                       
"visible": true 
},                   
{ "mDataProp": "EmpName" },                   
{ "mDataProp": "Address" },                   
{ "mDataProp": "Phone" }                   
]           
});
 
 But it is not working =========================
 
not going to methods================
 
Next i tryed ===========================
 
 
[OperationContract]        
[WebInvoke(Method = "POST", UriTemplate = "GetSSFPApplicationList?iDisplayLength={iDisplayLength}&iDisplayStart={iDisplayStart}&iSortCol_0={iSortCol_0}&sSortDir_0={sSortDir_0}&sSearch={sSearch}")]        
string GetSSFPApplicationList(int iDisplayLength, int iDisplayStart, int iSortCol_0, string sSortDir_0, string sSearch);        

but values are going 0 always ...


Can any one help me how to do actually with WCF =================

I Am not doing any MVC application its normal Asp.net Application with WCF Webservice ...

Please some one help me to solve this issue.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900