How to get Gridview Row count from Javascript?

 Posted by vishalneeraj-24503 on 11/23/2013 | Category: ASP.NET Interview questions | Views: 20508 | Points: 40
Answer:

With the help of Length property, we can get gridview rows length.

For ex:-
var grid_employee = document.getElementByID('<%=grid_view_employee_details.ClientID%>');

//Always check null before any operations, it avoids exception
if(grid_employee!=null)
{
var grid_employee_row_count = grid_employee.rows.length;
}


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response