Please i need some help in how to bind jqGrid with asmx webservice C# , i found some topics in how to convert asmx webservice to JSON but it’s not clear with me
Regards
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First of all you should define
WebMethodwhich will provide the data for the jqGrid. If you plan to implement server side sorting and paging the webmethod should have at least the following parameterswhere
JqGridDataclass will be defined for example likeThere are other different options how one can fill the grid, but it’s first important to understand at least one way.
It’s important, that to return JSON data from the web method you don’t need to convert the returned data manually to JSON. You need just return the object with the data and the ASMX web service will serialize the object itself to XML or JSON based on the headers of the HTTP request.
It the request to the server will have
application/json; charset=utf-8orapplication/jsonin theContent-Typepart of the HTTP header, the returned data will be JSON and will beOn the client side you should use
See here for a code example.
UPDATED: Here and here you can download Visual Studio demo projects. See the answer for more links to other demo projects.