TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Anilananda Chakrabortty
NA
425
78k
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
[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.
Reply
Answers (
2
)
Rest Asp.net web API help needed
What is difference between fault and nofault contract