views:

47

answers:

2

i binded the jqgrid using 'data type=local' its working fine but now i want to bind jqgrid using JSON datatype. can anybody help me.

A: 

Look at the example here. Click on the Loading Data -> JSON menu item

You will see:

url:'server.php?q=2', 
datatype: "json", 

The url is the page that will serve up the JSON, in this case with a parameter 'q=2' telling the page what JSON to fetch.

You can also point the url at a webservice that would return the JSON.

Daniel Dyson
+1  A: 

you'd have to create a web service to return JSON data. And, the JSON data you send back for jqgrid to consume has to have a particular structure. Please look at the link mentioned by Dyson. I think the last few lines says it all...of course you'd have to convert php to your asp.net language of choice.

deostroll
+1 Although you don't HAVE TO use a webservice, it is a good idea,
Daniel Dyson