源码:https://files.cnblogs.com/Fooo/jquery.combogrid-1.5.0.rar
效果:
下载的源程序中示例为php, 个人结合json规范修改成.net示例,如JsonData.ashx :
<%@ WebHandler Language="C#" Class="JsonData" %>
using System;
using System.Web;
/*
* 异步获取查询字符,并生成combogrid下拉表单数据。
* 必须返回json格式数据 -多属性及多数据行";
* 创建日期:Lt 2012-02-17
*/
public class JsonData : IHttpHandler
{
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
//post接收的数据参数
//context.Request.Params = {sidx=&page=1&sord=&rows=10&searchTerm=sad&ALL_HTTP=HTTP_CONNECTION%3aKeep-Alive%0d%0aHTTP_ACCEPT%3aapplication%2fjson%2c+text%2fjavascript%2c+*%2f*%3b+q%3d0.01%0d%0aHTTP_ACCEPT_ENCODING%3agzip%2c+deflate%0d%0aHTTP_ACCEPT_LANGUAGE%3azh-cn%0d%0aHTTP_HOST%3al...
string searchTerm = context.Request.Params["searchTerm"];
//Json数据格式:多属性及多数据行
string str = @"{""records"":[""1""],""total"":[""2""],""rows"":[{""id"":""小王"",""name"":""项目发布"",""author"":""354435""},{""id"":""陈明"",""name"":""环中国"",""author"":""title""}]}";
context.Response.Write(str);
}
public bool IsReusable {
get {
return false;
}
}
}
: