Click here to Skip to main content
15,891,513 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi to all,
i want to search a data in gridview using autocomplete using jquery.here this my jquery
HTML
<script type="text/javascript">
$(document).ready(function() {
      $('#txtID').keyup(function(event) {
            var searchKey = $(this).val().toLowerCase();
            $("#grdEmployee tr td:nth-child(1)").each(function() {
                  var cellText = $(this).text().toLowerCase();
                  if (cellText.indexOf(searchKey) >= 0) {
                        $(this).parent().show();
                  }
                  else {
                        $(this).parent().hide();
                  }
            });
      });
});
</script>   

and my textbox :-
HTML
<asp:TextBox ID="txtcustid" runat="server" Width="100"></asp:TextBox>

<asp:GridView
   ID="grdEmployee"
   runat="server"
   AutoGenerateColumns="true"></asp:GridView>

above code only search single column in girdview now i want how to filter all column in gridview.Kindly help me for this
for eg:
i have four column like shirt ,pant,shoe,tshirt

i need to search only shirt and shoe how to i do.
Posted
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900