var sSearchTerm = $('#<%=txtSearch.ClientID%>').val(); //Get the search box value if (sSearchTerm.length == 0) //if nothing is entered then show all the rows. { $("#<%=dgv_AcadamicYear.ClientID%> tr:has(td)").show(); return false; } //Iterate through all the td. $("#<%=dgv_AcadamicYear.ClientID%> tr:has(td)").children().each(function () { var cellText = $(this).text().toLowerCase(); if (cellText.indexOf(sSearchTerm.toLowerCase()) >= 0) //Check if data matches { $(this).parent().show(); iCounter++; return true; } });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)