How to loop through all grid view rows using jQuery
Also read GridView Tips and Tricks using jQuery
See below jQuery Code. In this code, the ID of GridView is "gdRows".
$(document).ready(function() { $("#<%=gdRows.ClientID%> tr:has(td)").each(function() { alert($(this).html()); }); });
If you want to loop through all the rows including th as well, then use below code.
$(document).ready(function() { $("#<%=gdRows.ClientID%> tr").each(function() { alert($(this).html()); }); });
And lastly, if you want to access only th row then
$(document).ready(function() { $("#<%=gdRows.ClientID%> th").each(function() { alert($(this).html()); }); });
Also read GridView Tips and Tricks using jQuery
Feel free to contact me for any help related to jQuery, I will gladly help you.