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
- [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 tried
- [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 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.