Number of rows in an ASP.NET GridView table using Javascript

Having the GridView control id, I would like to get some ideas on how to count GridView rows, or at least be able to tell if at least one row exists in a Gridview, this limitation is that I can only use the client (in this case javascript)

+4
source share
1 answer
var rowscount = document.getElementByID('<%=Gridview1.ClientID%>').rows.length; alert(rowscount); 
+9
source

Source: https://habr.com/ru/post/895880/


All Articles