none
flexigrid的问题,为什么flexigrid不呈现值,状态一直读取中。麻烦各位大神看下是什么问题。 RRS feed

  • 问题

  • 前台
    $("document").ready(function() {
      $("#tb").flexigrid({
      url: 'DateTB.ashx',
      dataType:'json',
      colModel:[
    { display: 'Name', name: 'Uname', width: 100, sortable: true, align: 'center' },
    { display: 'Password', name: 'Upwd', width: 180, sortable: true, align: 'center' }

    ],
      buttons: [
      { name: 'Add', bclass: 'add', onpress: test },
      { name: 'Delete', bclass: 'delete', onpress: test },
      { separator: true }
      ],
      searchitems: [
      { display: 'Password', name: 'Upwd' },
      { display: 'Name', name: 'Uname', isdefault: true }
      ],
      sortname: "Uname",
      sortorder: "asc",
      usepager: true,
      title: 'Countries',
      useRp: true,
      rp: 15,
      showTableToggleBtn: true,
      width: 700,
      height: 200
       
      });
     });


    //返回json数据的'DateTB.ashx'
     public class DateTB : IHttpHandler
      {

      public void ProcessRequest(HttpContext context)
      {
      context.Response.ContentType = "text/plain";
      //context.Response.Buffer = true;
      //context.Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
      //context.Response.AddHeader("pragma", "no-cache");
      //context.Response.AddHeader("cache-control", "");
      //context.Response.CacheControl = "no-cache";
      // string strSql = "select * from PeopleInfo";
      // DataTable dt = SqlHelper.ExecuteDataTable(strSql);
      // string jsonData = JsonHandle.GetJson(dt);
      string strRtn = "{page:1,total:1,rows:[{id:17,cell:[\"123\",\"123\"]}]}";
      }
      }

    2011年8月11日 8:45

答案

全部回复