且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将json返回的数据绑定到asp.net中的jquery gridview?

更新时间:2022-10-21 09:01:17

.ajax({
type:POST,
url :Default.aspx / MyMethod,
data:{'Code':'+ strcode +'},
contentType:application / json; charset = utf-8,
dataType:json,
成功:函数(结果){
//这里我想将gridview绑定到d
中包含的值//也是d中的值是动态意味着我从数据表中获取它们
}
});
}



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


http://www.aspsnippets.com/Articles/Bind-data-to-GridView-with-jQuery-or-JSON-in-ASPNet.aspx


有一篇很好的CP文章,你可以参考。



在ASP.NET中使用JqGrid [ ^ ]



希望这可以帮助你..

How can i bind the data returned by json object d to jquery grid ? I have tried using asp.net gridview but failed. I have seen some links of jquery grid but no source code is available in my aspx this is what i have done:

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
        }
    });
}


Thank you. also i have very confusion regarding jqgrid. is jqgrid is free and is jqgrid is client side or server side?

.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 } }); }


Thank you. also i have very confusion regarding jqgrid. is jqgrid is free and is jqgrid is client side or server side?


http://www.aspsnippets.com/Articles/Bind-data-to-GridView-with-jQuery-or-JSON-in-ASPNet.aspx


There is a nice CP article which you can refer.

Using JqGrid in ASP.NET[^]

Hope this helps you...