【问题标题】:how to bind the data returned by json to jquery gridview in asp.net?如何将json返回的数据绑定到asp.net中的jquery gridview?
【发布时间】:2013-12-26 04:48:32
【问题描述】:

如何将 json 对象 d 返回的数据绑定到 jquery 网格?我曾尝试使用 asp.net gridview 但失败了。我看过一些 jquery 网格的链接,但没有可用的源代码 在我的 aspx 中,这就是我所做的:

function get(strcode) {

    $.ajax({
        type: "POST",
        url: "Default.aspx/MyMethod",
        data: "{'Code':'" + strcode + "'}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function (result) {
            // Here i want to bind the gridview to the values contained in d
            //also the values in d are dynamic means i am getting them from the datatable
        }
    });
}

谢谢。我对 jqgrid 也很困惑。 jqgrid 是免费的,jqgrid 是客户端还是服务器端?

【问题讨论】:

  • 我得到的数据ie d如下:{"d":["1234567890-IndianJones"]}

标签: jquery asp.net json jquery-plugins jqgrid-asp.net


【解决方案1】:

有很多jQuery插件可以像这样使用

  1. jQuery DataTable
  2. JQ Grid

您可以访问那里您也可以获取 Json 数据示例的网站。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多