如何使用jQuery执行gridview.row.count并将标签文本更改为行数 [英] how to use jquery to do a gridview.row.count and change a labels text to the row count

查看:65
本文介绍了如何使用jQuery执行gridview.row.count并将标签文本更改为行数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上,是否可以使用jquery获取网格行数.

Basically, Is it possible to get a grids row count using jquery.

如果我的网格中有20行(不包括页眉或页脚),我现在要计算实际行数,这将告诉我的用户他们的列表中有多少个任务.

if my grid has 20 rows in it not including the header or footer, i want to now the count of actual rows, this will tell my users how many tasks they have in their list.

因为,我的页面使用标签,所以我希望用户能够在其各自的标签中看到每个网格的数量.每个选项卡都有一个标签,我希望该标签具有行数.

Since, my page uses tabs i want the user to be able to see the count of each grid in its respective tab. each tab has a label and i want that label to have the number of rows.

推荐答案

var rowsCount = $(#<%= GridView.ClientID%> tr").length;

var rowsCount = $("#<%=GridView.ClientID %> tr").length;

这篇关于如何使用jQuery执行gridview.row.count并将标签文本更改为行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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