[英]jqgrid in asp.net using json datatype
i binded the jqgrid using 'data type=local' its working fine but now i want to bind jqgrid using JSON datatype. 我使用'data type = local'绑定了jqgrid,但现在我想使用JSON数据类型绑定jqgrid。 can anybody help me.
有谁能够帮助我。
you'd have to create a web service to return JSON data. 您必须创建一个Web服务以返回JSON数据。 And, the JSON data you send back for jqgrid to consume has to have a particular structure.
而且,您发回供jqgrid使用的JSON数据必须具有特定的结构。 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.
我认为最后几行说明了一切...当然,您必须将php转换为您选择的asp.net语言。
Look at the example here . 看这里的例子。 Click on the Loading Data -> JSON menu item
单击加载数据-> JSON菜单项
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. url是将提供JSON的页面,在这种情况下,带有参数'q = 2'告诉页面要获取的JSON。
You can also point the url at a webservice that would return the JSON. 您还可以将URL指向将返回JSON的Web服务。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.