本文介绍了如何将json返回的数据绑定到asp.net中的jquery gridview?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将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){
//这里我想将gridview绑定到d
//中包含的值,d中的值也是动态的,意味着我从数据表中获取它们
}
} );
}
谢谢。我对jqgrid也很困惑。是jqgrid是免费的,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?
解决方案
这篇关于如何将json返回的数据绑定到asp.net中的jquery gridview?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!