如何获取gridview单元格并使用jquery将其放入文本框和标签? [英] How to get gridview cell and put it to the textbox and labels using jquery?

查看:74
本文介绍了如何获取gridview单元格并使用jquery将其放入文本框和标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,任何人都可以帮我获取gridview单元格的值,并使用jquery代码将其分配给文本框和标签???



我是什么尝试过:



$(#<%= GridView1.ClientID%> tr)。each(function(){

//首先跳过(标题)行

如果(!this.rowIndex)返回;

var age = $(this).find(td :last)。html();

list + = age +
;



i认为这是代码获取最后一列值

解决方案

(#<%= GridView1.ClientID%> tr)。each(function(){

//跳过第一行(标题)行

如果(!this.rowIndex)返回;

var age =


(这个).find(td:last)。html();

list + = age +
;



i认为这是ge的代码最后一列值

尝试这样的事情:

  var  list = 


Hi can anyone help me to get the value of gridview cell and assign it to the textbox and label using jquery code???

What I have tried:

$("#<%=GridView1.ClientID %> tr").each(function() {
//Skip first(header) row
if (!this.rowIndex) return;
var age = $(this).find("td:last").html();
list += age + "
";

i think this is the code for getting last column values

解决方案

("#<%=GridView1.ClientID %> tr").each(function() {
//Skip first(header) row
if (!this.rowIndex) return;
var age =


(this).find("td:last").html();
list += age + "
";

i think this is the code for getting last column values


Try something like this:

var list =


这篇关于如何获取gridview单元格并使用jquery将其放入文本框和标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆