如何使用jQuery算在asp.net在GridView的行 [英] How to count the rows in a gridview in asp.net using jQuery

查看:106
本文介绍了如何使用jQuery算在asp.net在GridView的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道怎么算的任何行的ASP:GridView控件使用jQuery。如果发现没有行,然后我想要做的东西...

Does anyone know how to count the no of rows in asp:GridView using jQuery. If no rows found then I want to do stuff...

推荐答案

A GridView控件只是呈现为一个标准的HTML表格,所以只算次数 TR 在GridView下元素:

A GridView is just rendered as a standard HTML table, so just count the number of tr elements under the GridView:

var totalRows = $("#<%=GridView1.ClientID %> tr").length;

这篇关于如何使用jQuery算在asp.net在GridView的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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