如何使用JavaScript绑定网格? [英] How to bind grid using javascript?
本文介绍了如何使用JavaScript绑定网格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
javascript代码将数据绑定到gridview
javascript code to bind data to gridview
推荐答案
可能使用jQuery对Web服务进行ajax调用,然后在ajax回调中填充gridview
在这里看看
http://weblogs.asp.net/ahmedmoosa/archive/2010/10/30/bind-gridview-using-jquery.aspx [
Possibly use jQuery to make an ajax call to a webservice, then populate the gridview in the ajax callback
Have a look here
http://weblogs.asp.net/ahmedmoosa/archive/2010/10/30/bind-gridview-using-jquery.aspx[^]
这取决于您从服务器接收响应的方式.
因此,在客户端,您不再绑定网格.您只需替换/更新网格的HTML内容.
像这样的东西:
It depends on the way you recieve back the response from server.
As such, on client side you don''t bind the grid anymore. You simply replace/update the HTML content of the grid.
Something like:
document.getElementById("gvTest").outerHTML = responseText;
使用Java更新网格的方法之一: Web应用程序的ClientCallback自定义控件 [
One of the ways to update grid using Javascript: ClientCallback custom control for web applications[^]
这篇关于如何使用JavaScript绑定网格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文