Jqurey EasyUI DataGrid数据绑定有关问题

Jqurey EasyUI DataGrid数据绑定问题
直接上码
【测试A】
<head id="Head1" runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="jquery-easyui-1.4.1/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="jquery-easyui-1.4.1/themes/icon.css" />
    <link rel="stylesheet" type="text/css" href="jquery-easyui-1.4.1/demo/demo.css" />
    <script type="text/javascript" src="jquery-easyui-1.4.1/jquery.min.js"></script>
    <script type="text/javascript" src="jquery-easyui-1.4.1/jquery.easyui.min.js"></script>
    <script type="text/javascript" language="javascript">
        $(function ()
        {
            $('#MailTable').datagrid({
                url: 'Handler4.ashx',
                striped: true,
                title: ""
            })
        })
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table id="MailTable" class="easyui-datagrid" data-options="singleSelect:true,collapsible:true,rownumbers:true,autoRowHeight:false,height:650,width:960,pagination:true,pageSize:20, pageList:[20,30,40,50],method:'get',toolbar:'#tb',striped:true"
            fitcolumns="true">
            <thead>
                <tr>
                    <th data-options="field:'tName',sortable:true">
                    </th>
                    <th data-options="field:'tEmail',sortable:true">
                    </th>
                    <th data-options="field:'TheDate',sortable:true">
                    </th>

                </tr>
            </thead>
        </table>
    </div>
    </form>
</body>
</html>

传值的ashx
public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";
        SqlHelp sqla = new SqlHelp();
        string sqlstr = "select * from Rex_Test";
        DataTable dt = sqla.GetDataTable(sqlstr);
        string js = this.DataTableToJson(dt, dt.Rows.Count.ToString());
        context.Response.Write(js);
        sqla.SqlClose();
    }

    public string DataTableToJson(DataTable dt, string TotalRecord)
    {
        string jsonstr = "{\"total\":" + TotalRecord + ",\"rows\":[";
        for (int j = 0; j < dt.Rows.Count; j++)
        {
            jsonstr = jsonstr + "{";
            for (int i = 0; i < dt.Columns.Count; i++)
            {

                jsonstr = jsonstr + "\"" + dt.Columns[i].ColumnName + "\":\"" + dt.Rows[j][i] + "\"";
                if (i != dt.Columns.Count - 1)
                {
                    jsonstr = jsonstr + ",";
                }
            }
            if (j == dt.Rows.Count - 1)
            {
                jsonstr = jsonstr + "}";
            }
            else
            {
                jsonstr = jsonstr + "},";
            }
        }
        jsonstr = jsonstr + "]}";
        return jsonstr;
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

运行结果:
Jqurey EasyUI DataGrid数据绑定有关问题

【测试B】
我换个数据表,且把相对应的绑定字段更换,如下
<head id="Head1" runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="jquery-easyui-1.4.1/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="jquery-easyui-1.4.1/themes/icon.css" />
    <link rel="stylesheet" type="text/css" href="jquery-easyui-1.4.1/demo/demo.css" />
    <script type="text/javascript" src="jquery-easyui-1.4.1/jquery.min.js"></script>
    <script type="text/javascript" src="jquery-easyui-1.4.1/jquery.easyui.min.js"></script>
    <script type="text/javascript" language="javascript">
        $(function ()
        {
            $('#MailTable').datagrid({
                url: 'Handler3.ashx',
                striped: true,
                title: ""
            })
        })
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table id="MailTable" class="easyui-datagrid" data-options="singleSelect:true,collapsible:true,rownumbers:true,autoRowHeight:false,height:650,width:960,pagination:true,pageSize:20, pageList:[20,30,40,50],method:'get',toolbar:'#tb',striped:true"
            fitcolumns="true">
            <thead>
                <tr>
                    <th data-options="field:'NoticeName',sortable:true">
                        
                    </th>
                    <th data-options="field:'NoticeContent',sortable:true">
                       
                    </th>
                    <th data-options="field:'NoticePlusFile',sortable:true">
                       
                    </th>
                    <th data-options="field:'ExistAccessory',sortable:true">
               
                    </th>
                    <th data-options="field:'NoticeTime',sortable:true">
                    </th>

                </tr>
            </thead>
        </table>
    </div>
    </form>
</body>
</html>

此处的ashx,如下:
public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";
        SqlHelp sqla = new SqlHelp();
        string sqlstr = "select * from tNotice";
        DataTable dt = sqla.GetDataTable(sqlstr);
        string js = this.DataTableToJson(dt, dt.Rows.Count.ToString());
        context.Response.Write(js);
        sqla.SqlClose();
    }

    public string DataTableToJson(DataTable dt, string TotalRecord)
    {
        string jsonstr = "{\"total\":" + TotalRecord + ",\"rows\":[";
        for (int j = 0; j < dt.Rows.Count; j++)
        {
            jsonstr = jsonstr + "{";
            for (int i = 0; i < dt.Columns.Count; i++)
            {

                jsonstr = jsonstr + "\"" + dt.Columns[i].ColumnName + "\":\"" + dt.Rows[j][i] + "\"";
                if (i != dt.Columns.Count - 1)
                {
                    jsonstr = jsonstr + ",";
                }
            }
            if (j == dt.Rows.Count - 1)
            {
                jsonstr = jsonstr + "}";
            }
            else
            {
                jsonstr = jsonstr + "},";
            }
        }
        jsonstr = jsonstr + "]}";
        return jsonstr;
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

运行结果:
Jqurey EasyUI DataGrid数据绑定有关问题
试了好多次,都是这样的结果,【A测试】运行绑定成功显示;而【B测试】绑定后页面不显示信息。
我也仔细看了代码,没找到原因,我也是刚开始学习这个东西,很多还不了解。
难道是因为【测试B】中表【tNotice】存放的数据比表【Rex_Test】中存放的数据多,或者是前者中字段长度比后者长,感脚这都不科学啊,求指导,让俺少走点弯路,谢了。
------解决思路----------------------
可能是字段名不对应
------解决思路----------------------
直接访问'Handler3.ashx'看看输出的结果是什么样子?
------解决思路----------------------
也许吧,检查下就知道了
------解决思路----------------------
Handler3.ashx 返回的是什么?
如果有特殊字符、会破坏json的结构
------解决思路----------------------
按照你的ToJson方法
------解决思路----------------------
你的ToJson方法